Docs Menu
Docs Home
/ / /
C Driver
/ /

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.

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)
libbson package(s)
libmongoc package(s)
Notes

APT (apt / apt-get)

Debian-based Linux distributions (Debian, Ubuntu, Linux Mint, etc.)

libbson-1.0-0, libbson-dev, libbson-doc

libmongoc-1.0-0, libmongoc-dev, libmongoc-doc

YUM / DNF

RHEL-based systems (RHEL, Fedora, CentOS, Rocky Linux, AlmaLinux)

libbson, libbson-devel

mongo-c-driver-libs, mongo-c-driver-devel

Except on Fedora the EPEL repositories must be enabled (i.e. install the epel-release package first)

APK

Alpine Linux

libbson, libbson-dev, libbson-static

mongo-c-driver, mongo-c-driver-dev, mongo-c-driver-static

pacman

Arch Linux

mongo-c-driver

mongo-c-driver

A single package provides both runtime and development support for both libbson and libmongoc

Homebrew

macOS

mongo-c-driver

mongo-c-driver

Conan

Cross-platform

mongo-c-driver

mongo-c-driver

vcpkg

Cross-platform

libbson

mongo-c-driver

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.

See also:

Setting
Options
Default
Notes

shared

(Boolean)

False

Build the shared library instead of the static library

fPIC

(Boolean)

True

Compile code as position-independent

srv

(Boolean)

True

Enables MongoDB SRV URI support

with_ssl

openssl, libressl, windows, darwin, False

openssl (See note)

Select a TLS backend. Setting to "False" disables TLS support.

with_sasl

sspi, cyrus, False

sspi on Windows, False elsewhere

Enable SASL authentication support

with_snappy

(Boolean)

True

Enable Snappy compression

with_zlib

(Boolean)

True

Enable Zlib compression

with_zstd

(Boolean)

True

Enable Zstd compression

Note

Conan will use OpenSSL as the default TLS backend, even on platforms that ship with their own TLS implementation (e.g. Windows and macOS). This behavior differs from the upstream default-configured libmongoc or the vcpkg distribution of mongo-c-driver, which both default to use the TLS implementation preferred for the target platform.

The mongo-c-driver package offered by vcpkg supports several optional features.

See also:

Feature
Notes

icu

Installs the ICU library, which is necessary for non-ASCII usernames and passwords in pre-1.25 libmongoc

openssl

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.

snappy

Enable the Snappy compression backend

zstd

Enable the Zstd compression backend

Back

Reference

On this page

  • Package Names and Availability
  • Conan Settings and Features
  • vcpkg Optional Features