Package Installation Reference#
libbson and libmongoc are available from several package management tools
on a variety of systems.
Important
The third-party packages detailed here are not directly controlled via the
mongo-c-driver maintainers, and the information found here may be incomplete
or out-of-date.
Package Names and Availability#
This table details the names and usage notes of such packages.
Note
The development packages (ending in -dev or -devel) include files required to build applications using libbson and libmongoc.
See also
For a step-by-step tutorial on installing packages, refer to Installing Prebuilt MongoDB C Driver Libraries.
| Packaging Tool | Platform(s) | 
 | 
 | Notes | 
|---|---|---|---|---|
| APT ( | Debian-based Linux distributions (Debian, Ubuntu, Linux Mint, etc.) | 
 | 
 | |
| Yum/DNF | RHEL-based systems (RHEL, Fedora, CentOS, Rocky Linux, AlmaLinux) | 
 | 
 | Except on Fedora the EPEL repositories must be enabled (i.e. install
the  | 
| APK | Alpine Linux | 
 | 
 | |
| pacman | Arch Linux | 
 | 
 | A single package provides both runtime and development support for both
 | 
| Homebrew | macOS | 
 | 
 | |
| Conan | Cross-platform | 
 | 
 | |
| vcpkg | Cross-platform | 
 | 
 | 
Conan Settings and Features#
The mongo-c-driver Conan recipe includes several build settings that
correspond to the configure-time build settings available when building the
mongo-c-driver project.
| Setting | Options | Default | Notes | 
|---|---|---|---|
| 
 | (Boolean) | 
 | Build the shared library instead of the static library | 
| 
 | (Boolean) | 
 | Compile code as position-independent | 
| 
 | (Boolean) | 
 | Enables MongoDB SRV URI support | 
| 
 | 
 | 
 | Select a TLS backend. Setting to “ | 
| 
 | 
 | 
 | Enable SASL authentication support | 
| 
 | (Boolean) | 
 | Enable Snappy compression | 
| 
 | (Boolean) | 
 | Enable Zlib compression | 
| 
 | (Boolean) | 
 | Enable Zstd compression | 
vcpkg Optional Features#
The mongo-c-driver package offered by vcpkg supports several optional
features.
| Feature | Notes | 
|---|---|
| 
 | Installs the ICU library, which is necessary for non-ASCII usernames and
passwords in pre-1.25  | 
| 
 | Use OpenSSL for encryption, even on Windows and Apple platforms which provide a native TLS backend. If omitted, the default will be to use the preferred TLS implementation for the system. | 
| 
 | Enable the Snappy compression backend | 
| 
 | Enable the Zstd compression backend |