MONGOC_INSTALLING(3)
π MONGOC_INSTALLING(3) π
okay bestie, welcome to the libmongoc installing page, aka the manual page formally known as MONGOC_INSTALLING(3). this is where we talk about how you get the C driver onto your machine, how you get it back off again, and how to not let it beef with other stuff you've got installed. let's go π¦
β¨ NOTE β¨
so here's the tea, and it's a big one: a whole lot of this documentation section has been rewritten and moved. the new home is called Obtaining the MongoDB C Driver Libraries. go there for the fresh version, bestie π«Ά
πΈ SUPPORTED PLATFORMS πΈ
NOTE: moved. it now lives at mongo-c-driver Platform Support.
π INSTALL LIBMONGOC WITH A PACKAGE MANAGER π
NOTE: moved. the new spot is Installing Prebuilt MongoDB C Driver Libraries.
π INSTALL LIBBSON WITH A PACKAGE MANAGER π
NOTE: moved. same destination, bestie: Installing Prebuilt MongoDB C Driver Libraries.
π³ DOCKER IMAGE π³
you can find a Docker image up on Docker Hub, and it even comes with example usage of using libmongoc to ping a MongoDB database from inside a Docker container. containerized and cute, no cap β¨
π₯ BUILD ENVIRONMENT π₯
NOTE: moved. it's now at Building the C Driver Libraries from Source.
π§Ή Uninstalling the installed components π§Ή
there are two ways to uninstall the components you've installed, and honestly? pick your fighter π
Way number one: invoke the uninstall program directly.
on Linux/Unix:
$ sudo /usr/local/share/mongo-c-driver/uninstall.sh
on Windows:
$ C:\mongo-c-driver\share\mongo-c-driver\uninstall.bat
Way number two: do it from inside the build directory β but only assuming it's in the exact same state it was in when you ran the install command. important detail, don't skip it π
$ sudo cmake --build . --target uninstall
and fun fact: the second approach literally just invokes the uninstall program referenced in the first approach. it's giving "same energy, different door" π
π Dealing with Build Failures π
if your attempt to build the C driver fails, please go check the README for instructions on requesting assistance. you are not alone, bestie π«Ά
π ADDITIONAL OPTIONS FOR INTEGRATORS π
so like, hypothetically: you're building the BSON library and/or the C driver to embed with other components, and you wanna avoid any potential for collision with components installed from a standard build or from a distribution package manager. valid concern! in that case you can make use of the BSON_OUTPUT_BASENAME and MONGOC_OUTPUT_BASENAME options to cmake. slay π
$ cmake -DBSON_OUTPUT_BASENAME=custom_bson -DMONGOC_OUTPUT_BASENAME=custom_mongoc ..
the above command would produce libraries named libcustom_bson.so and libcustom_mongoc.so (or with the extension appropriate for the build platform). those libraries could be placed in a standard system directory or in an alternate location, and could be linked to by specifying something like -lcustom_mongoc -lcustom_bson on the linker command line β possibly adjusting the specific flags to those required by your linker. iconic behavior, fr fr β
π AUTHOR π
MongoDB, Inc
π COPYRIGHT π
2017-present, MongoDB, Inc
okay that's the whole page, you ate that π this was version 1.26.0, dated Mar 31, 2024, and it came to you straight from the MONGOC_INSTALLING(3) era of libmongoc. go forth and install responsibly, bestie β mwah πβ¨
π¦ where this page comes from
- ubuntu noble: libmongoc-doc 1.26.0-1.1ubuntu2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms