# 使用 Homebrew, apk, dnf, MacPorts, pacman, apt, zypper 安装 mongo-c-driver

查看 mongo-c-driver 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

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

  证据: local Homebrew formula metadata

- MacPorts (94%):

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

  证据: 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 mongo-c-driver
```

  证据: Alpine Linux edge package indexes: mongo-c-driver from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- dnf (92%):

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

  证据: Fedora Rawhide package metadata: mongo-c-driver from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

- pacman (92%):

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

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

- Debian apt (92%):

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

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

- zypper (92%):

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

  证据: openSUSE Tumbleweed package metadata: bson-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:mongo-c-driver
- **软件包管理器:** Homebrew
- **版本:** 2.3.3
- **来源摘要:** C driver for MongoDB
- **主页:** <https://github.com/mongodb/mongo-c-driver>
- **仓库:** <https://github.com/mongodb/mongo-c-driver>
- **最后更新:** 2026-07-14T15:57:27Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- mongoc2-stat (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 2.3.3
## 项目历史与用法

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.

### 项目历史

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.

### 采用历史

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.

### 使用方式

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.

### 来源

- <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/>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 其他软件包管理器记录

- 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-r1: 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-r1: 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-r1: 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-r1: 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


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
