# Install mongo-c-driver with Homebrew, apk, apt, dnf, MacPorts, pacman, zypper

C driver for MongoDB. Version 2.3.2 via Homebrew; verified 2026-07-07.

## Install

```sh
sudo av install brew:mongo-c-driver
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install mongo-c-driver
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mongo-c-driver
```

  Evidence: MacPorts ports tree: devel/mongo-c-driver/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add libbson
```

  Evidence: Alpine Linux edge package indexes: libbson from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install libbson-1.0-0t64
```

  Evidence: Debian stable package indexes: libbson-1.0-0t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install libbson
```

  Evidence: Fedora Rawhide package metadata: libbson from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- pacman (92%):

```sh
sudo pacman -S mongo-c-driver
```

  Evidence: Arch Linux sync databases: mongo-c-driver from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install bson-devel
```

  Evidence: openSUSE Tumbleweed package metadata: bson-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:mongo-c-driver
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/mongo-c-driver>
- **Version:** 2.3.2
- **Source summary:** C driver for MongoDB
- **Homepage:** <https://github.com/mongodb/mongo-c-driver>
- **Repository:** <https://github.com/mongodb/mongo-c-driver>
- **Upstream docs:** <https://www.mongoc.org/>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/mongodb/mongo-c-driver/archive/refs/tags/2.3.2.tar.gz>
- **Last updated:** 2026-07-07T16:38:47Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- mongoc2-stat (cli)
- mongoc2-stat (alias)

## Dependencies

- openssl@3
- zstd

## Build dependencies

- cmake
- pkgconf
- sphinx-doc

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.3.2
- Package-manager updated: 2026-07-07
- Local data: ok
- Upstream repository: https://github.com/mongodb/mongo-c-driver
- Upstream latest detected: 2.3.2 (current)
## Project history and usage

mongo-c-driver is MongoDB's official C client-driver project. The documentation identifies libmongoc as the official driver for C applications and explains that it depends on libbson for creating and parsing BSON, MongoDB's native document format. The project therefore serves two audiences: C programs that connect directly to MongoDB, and higher-level drivers or bindings that need a maintained C implementation underneath.

### Project history

The driver line has been packaged under several names. Homebrew notes mongo-c-driver as also known as libmongoc and mongo-c-driver@2, and formerly known as mongo-c. The upstream API site describes the package as a cross-platform MongoDB client library for C and for writing drivers in higher-level languages, while the GitHub repository summarizes the project as libmongoc plus libbson and points contributors to MongoDB's driver documentation and support channels.

### Adoption history

The 2.x series is the main Homebrew formula. MongoDB's release notes mark 2.0.0 as a breaking release that removed deprecated types and methods, added BSON Binary Vector subtype support in libbson, and added libmongoc support for aggregate operations that include lookup stages for in-use encryption. Later 2.x notes show the driver continuing to track server features such as OIDC authentication variants, Queryable Encryption operations, client-side timeout behavior, overload handling, and other production-driver concerns.

### How it is used

In practice the formula is installed when building C applications against MongoDB, compiling software that embeds MongoDB access through libmongoc, or satisfying native dependencies for language bindings and tools. It sits beside server packages and higher-level MongoDB drivers: users rarely run it as an end-user database tool, but many builds need its headers, libraries, pkg-config/CMake metadata, and small diagnostic utility.

### Sources

- <https://formulae.brew.sh/formula/mongo-c-driver>
- <https://github.com/mongodb/mongo-c-driver>
- <https://mongoc.org/>
- <https://www.mongodb.com/docs/languages/c/c-driver/current/>
- <https://www.mongodb.com/docs/languages/c/c-driver/current/reference/release-notes/>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** mongo-c-driver
- **Aliases:** libmongoc, mongo-c-driver@2
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - libbson-1.0-0t64 - 1.30.4-1+deb13u2: normalized package name match | Debian stable package indexes: libbson-1.0-0t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Library to parse and generate BSON documents - runtime files | https://github.com/mongodb/mongo-c-driver
- Debian apt - libbson-dev - 1.30.4-1+deb13u2: normalized package name match | Debian stable package indexes: libbson-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Library to parse and generate BSON documents - dev files | https://github.com/mongodb/mongo-c-driver
- Debian apt - libbson-doc - 1.30.4-1+deb13u2: normalized package name match | Debian stable package indexes: libbson-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Library to parse and generate BSON documents - documentation | https://github.com/mongodb/mongo-c-driver
- Debian apt - libmongoc-1.0-0t64 - 1.30.4-1+deb13u2: normalized package name match | Debian stable package indexes: libmongoc-1.0-0t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | MongoDB C client library - runtime files | https://github.com/mongodb/mongo-c-driver
- Debian apt - libmongoc-dev - 1.30.4-1+deb13u2: normalized package name match | Debian stable package indexes: libmongoc-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | MongoDB C client library - dev files | https://github.com/mongodb/mongo-c-driver
- Debian apt - libmongoc-doc - 1.30.4-1+deb13u2: normalized package name match | Debian stable package indexes: libmongoc-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | MongoDB C client library - documentation | https://github.com/mongodb/mongo-c-driver
- Ubuntu apt - libbson-1.0-0t64 - 1.26.0-1.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libbson-1.0-0t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Library to parse and generate BSON documents - runtime files | https://github.com/mongodb/mongo-c-driver
- Ubuntu apt - libbson-dev - 1.26.0-1.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libbson-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Library to parse and generate BSON documents - dev files | https://github.com/mongodb/mongo-c-driver
- Ubuntu apt - libbson-doc - 1.26.0-1.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libbson-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Library to parse and generate BSON documents - documentation | https://github.com/mongodb/mongo-c-driver
- Ubuntu apt - libmongoc-1.0-0t64 - 1.26.0-1.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libmongoc-1.0-0t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | MongoDB C client library - runtime files | https://github.com/mongodb/mongo-c-driver
- Ubuntu apt - libmongoc-dev - 1.26.0-1.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libmongoc-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | MongoDB C client library - dev files | https://github.com/mongodb/mongo-c-driver
- Ubuntu apt - libmongoc-doc - 1.26.0-1.1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libmongoc-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | MongoDB C client library - documentation | https://github.com/mongodb/mongo-c-driver
- apk - libbson - 1.30.6-r0: normalized package name match | Alpine Linux edge package indexes: libbson from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Building, parsing, and iterating BSON documents | https://github.com/mongodb/mongo-c-driver
- apk - libbson-dev - 1.30.6-r0: normalized package name match | Alpine Linux edge package indexes: libbson-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Client library written in C for MongoDB (development files) | https://github.com/mongodb/mongo-c-driver
- apk - libbson-static - 1.30.6-r0: normalized package name match | Alpine Linux edge package indexes: libbson-static from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Client library written in C for MongoDB (static library) | https://github.com/mongodb/mongo-c-driver
- apk - mongo-c-driver - 1.30.6-r0: normalized package name match | Alpine Linux edge package indexes: mongo-c-driver from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Client library written in C for MongoDB | https://github.com/mongodb/mongo-c-driver


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [openssl@3](https://www.automicvault.com/pkg/brew/openssl-3/) - Runtime dependency declared by Homebrew.
- [zstd](https://www.automicvault.com/pkg/brew/zstd/) - Runtime dependency declared by Homebrew.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [sphinx-doc](https://www.automicvault.com/pkg/brew/sphinx-doc/) - Build dependency declared by Homebrew.
- [fastnetmon](https://www.automicvault.com/pkg/brew/fastnetmon/) - Popular package that depends on this formula.
- [syslog-ng](https://www.automicvault.com/pkg/brew/syslog-ng/) - Popular package that depends on this formula.
- [treefrog](https://www.automicvault.com/pkg/brew/treefrog/) - Popular package that depends on this formula.
- [mongo-c-driver@1](https://www.automicvault.com/pkg/brew/mongo-c-driver-1/) - Package name indicates the same formula family.
- [ejdb](https://www.automicvault.com/pkg/brew/ejdb/) - Shares av.db curated category or tags: c, cli, data, database.
- [sdb](https://www.automicvault.com/pkg/brew/sdb/) - Shares av.db curated category or tags: c, cli, data, database.
- [whodb-cli](https://www.automicvault.com/pkg/brew/whodb-cli/) - Shares av.db curated category or tags: cli, data, database, mongodb.
- [automysqlbackup](https://www.automicvault.com/pkg/brew/automysqlbackup/) - Shares av.db curated category or tags: cli, data, database.
- [basex](https://www.automicvault.com/pkg/brew/basex/) - Shares av.db curated category or tags: cli, data, database.
- [berkeley-db](https://www.automicvault.com/pkg/brew/berkeley-db/) - Shares av.db curated category or tags: cli, data, database.
- [cayley](https://www.automicvault.com/pkg/brew/cayley/) - Shares av.db curated category or tags: cli, data, database.
- [couchdb](https://www.automicvault.com/pkg/brew/couchdb/) - Shares av.db curated category or tags: cli, data, database.
- [mysql](https://www.automicvault.com/pkg/brew/mysql/) - Local metadata places this package in an adjacent workflow. Shared terms: cli, data, database, openssl, openssl-3.
- [pgloader](https://www.automicvault.com/pkg/brew/pgloader/) - Local metadata places this package in an adjacent workflow. Shared terms: cli, data, database, openssl, openssl-3.
- [mydumper](https://www.automicvault.com/pkg/brew/mydumper/) - Local metadata places this package in an adjacent workflow. Shared terms: cli, data, database, openssl, openssl-3.

## Combined YAML source

View the package source record on GitHub. [combined/mongo-c-driver.yml](https://github.com/automic-vault/db/blob/main/combined/mongo-c-driver.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
