# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper 安装 man-db

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

## 安装

```sh
sudo av install brew:man-db
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install man-db
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install man-db
```

  证据: MacPorts ports tree: textproc/man-db/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add man-db
```

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

- Debian apt (92%):

```sh
sudo apt install man-db
```

  证据: Debian stable package indexes: man-db from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- dnf (92%):

```sh
sudo dnf install man-db
```

  证据: Fedora Rawhide package metadata: man-db from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#man-db
```

  证据: nixpkgs package indexes: pkgs/by-name/ma/man-db/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S man-db
```

  证据: Arch Linux sync databases: man-db from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz

- zypper (92%):

```sh
sudo zypper install man
```

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

## 软件包事实

- **软件包键:** brew:man-db
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/man-db>
- **版本:** 2.13.1
- **来源摘要:** Unix documentation system
- **主页:** <https://man-db.gitlab.io/man-db/>
- **上游文档:** <https://man-db.gitlab.io/man-db/>
- **许可证:** GPL-2.0-or-later
- **源码归档:** <https://download.savannah.gnu.org/releases/man-db/man-db-2.13.1.tar.xz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- accessdb (cli)
- catman (cli)
- gaccessdb (cli)
- gapropos (cli)
- gcatman (cli)
- glexgrog (cli)
- gman (cli)
- gman-recode (cli)
- gmandb (cli)
- gmanpath (cli)
- gwhatis (cli)
- lexgrog (cli)
- mandb (cli)
- accessdb (别名)
- catman (别名)
- gaccessdb (别名)
- gapropos (别名)
- gcatman (别名)
- glexgrog (别名)
- gman (别名)
- gman-recode (别名)
- gmandb (别名)
- gmanpath (别名)
- gwhatis (别名)
- lexgrog (别名)
- mandb (别名)

## 依赖

- groff
- libpipeline

## 构建依赖

- pkgconf

## 安装行为

- post-install 钩子: 未定义
- 注意事项: Commands also provided by macOS have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "bin" directory to your PATH from your bashrc like: PATH="$HOMEBREW_PREFIX/opt/man-db/libexec/bin:$PATH"
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.13.1
- 本地数据: OK
- 上游仓库: https://man-db.gitlab.io/man-db/
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

man-db is an implementation of the standard Unix manual-page system accessed through `man`. Its official homepage describes it as using an indexed database instead of traditional flat-text whatis databases, with utilities such as `man`, `mandb`, `apropos`, and `whatis` around that database.

### 项目历史

The man-db source tree carries copyright lines going back to John W. Eaton in 1990-1991, Graeme W. Wilford, Fabrizio Polacco, and later Colin Watson. The README identifies Colin Watson as current maintainer and points users to the manual for configuration and formatter details.

man-db's development reflects the long transition from historical Unix man-page lookup toward database-backed indexing. Its configuration and cache model track Filesystem Hierarchy Standard paths such as `/usr/share` for manual pages and `/var/cache/man` for cached cat pages, while preserving compatibility with older FSSTND layouts.

### 采用历史

The official man-db homepage lists use by several GNU/Linux distributions, including Arch Linux, Debian, Dragora, Fedora, Gentoo, openSUSE, and Ubuntu, and notes that it also compiles and runs on a number of proprietary Unix systems.

In package-manager culture, man-db is one of the packages users notice during installs and upgrades because `mandb` updates the manual-page index. It is infrastructure rather than an application: distributions depend on it to make `man`, `apropos`, and `whatis` fast and searchable.

### 使用方式

`mandb` initializes or manually updates index database caches, and the stored information is used by man-db utilities to improve speed and functionality. `manpath` computes manual search paths using the man-db configuration file and the user's environment.

The upstream documentation points packagers and builders to `./src/man_db.conf` and `man/man5/manpath.5` for configuration details. Installed paths depend on `sysconfdir`, while the upstream `manpath` manual documents `~/.manpath` as the default user configuration for `manpath -C`.

### 为什么软件包爱好者会关心

man-db is important to package nerds because it turns scattered manual pages from every installed package into a searchable local index. Its post-install hooks, cache ownership choices, setuid options, compression support, and path mapping influence how documentation behaves across a whole system.

It is also a classic distribution-integration package: the upstream tarball has defaults, but Linux distributions commonly patch paths or integrate it with package triggers, tmpfiles cleanup, and policy around `/usr/share/man` and `/var/cache/man`.

### 时间线

- 1990: Early man-db copyright lineage begins with John W. Eaton.
- 2001: README notes FHS manual roots `/usr/share` and `/var/cache/man` as current defaults for manual and cat hierarchies.
- 2020: GitLab project creation records the modern GitLab project presence.
- 2022: NEWS notes the Git repository transfer to https://gitlab.com/man-db/man-db.
- 2025: man-db 2.13.1 was released with formatting, portability, and build fixes.

### Related projects

- man-db is related to traditional Unix `man`, `apropos`, `whatis`, `catman`, and `makewhatis` implementations.
- It also depends on formatter tools such as groff or compatible nroff/troff implementations, and it is often compared with mandoc on systems that can use either as the manual-page viewer/searcher.

### 来源

- <https://gitlab.com/man-db/man-db>
- <https://gitlab.com/man-db/man-db/-/raw/main/NEWS.md>
- <https://gitlab.com/man-db/man-db/-/raw/main/README.md>
- <https://gitlab.com/man-db/man-db/-/raw/main/man/man1/manpath.man1>
- <https://gitlab.com/man-db/man-db/-/raw/main/man/man5/manpath.man5>
- <https://gitlab.com/man-db/man-db/-/raw/main/src/man_db.conf.in>
- <https://man-db.nongnu.org/>


## 安全说明

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ${sysconfdir}/man_db.conf, ~/.manpath
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** man-db
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- Debian apt - man-db - 2.13.1-1: normalized package name match | Debian stable package indexes: man-db from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | tools for reading manual pages | https://man-db.gitlab.io/man-db/
- Nix - man-db: normalized package name match | nixpkgs package indexes: pkgs/by-name/ma/man-db/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - man-db - 2.12.0-4build2: normalized package name match | Ubuntu 24.04 LTS package indexes: man-db from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | tools for reading manual pages | https://man-db.gitlab.io/man-db/
- apk - man-db - 2.13.1-r1: normalized package name match | Alpine Linux edge package indexes: man-db from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The man command and related utilities for examining on-line help files | https://man-db.gitlab.io/man-db/
- apk - man-db-doc - 2.13.1-r1: normalized package name match | Alpine Linux edge package indexes: man-db-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The man command and related utilities for examining on-line help files (documentation) | https://man-db.gitlab.io/man-db/
- apk - man-db-lang - 2.13.1-r1: normalized package name match | Alpine Linux edge package indexes: man-db-lang from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Languages for package man-db | https://man-db.gitlab.io/man-db/
- apk - man-db-systemd - 2.13.1-r1: normalized package name match | Alpine Linux edge package indexes: man-db-systemd from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The man command and related utilities for examining on-line help files (systemd files) | https://man-db.gitlab.io/man-db/
- dnf - man-db - 2.13.1-4.fc45: normalized package name match | Fedora Rawhide package metadata: man-db from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Tools for searching and reading man pages | http://www.nongnu.org/man-db/
- dnf - man-db-cron - 2.13.1-4.fc45: normalized package name match | Fedora Rawhide package metadata: man-db-cron from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Periodic update of man-db cache | http://www.nongnu.org/man-db/
- pacman - man-db - 2.13.1-2: normalized package name match | Arch Linux sync databases: man-db from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | A utility for reading man pages | https://gitlab.com/man-db/man-db
- zypper - man - 2.13.1-7.3: normalized package name match | openSUSE Tumbleweed package metadata: man from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A Program for Displaying man Pages | https://savannah.nongnu.org/projects/man-db
- MacPorts - man-db: normalized package name match | MacPorts ports tree: textproc/man-db/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Documentation packages](https://pkg.so/zh-hans/documentation-tools/) - Matched documentation, manual, or publishing metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [groff](https://pkg.so/zh-hans/brew/groff/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [mandoc](https://pkg.so/zh-hans/brew/mandoc/) - Shares pkgdb curated category or tags: cli, documentation, man-pages, manual-pages, system.
- [man2html](https://pkg.so/zh-hans/brew/man2html/) - Shares pkgdb curated category or tags: cli, documentation, man-pages, manual-pages, system.
- [bash](https://pkg.so/zh-hans/brew/bash/) - Shares pkgdb curated category or tags: cli, system, unix.
- [gnu-tar](https://pkg.so/zh-hans/brew/gnu-tar/) - Shares pkgdb curated category or tags: cli, system, unix.
- [cups](https://pkg.so/zh-hans/brew/cups/) - Shares pkgdb curated category or tags: cli, system, unix.
- [lsof](https://pkg.so/zh-hans/brew/lsof/) - Shares pkgdb curated category or tags: cli, system, unix.
- [libpaper](https://pkg.so/zh-hans/brew/libpaper/) - Shares pkgdb curated category or tags: cli, system, unix.
- [xclip](https://pkg.so/zh-hans/brew/xclip/) - Shares pkgdb curated category or tags: cli, system, unix.
- [agedu](https://pkg.so/zh-hans/brew/agedu/) - Local package facts share a topical domain. Shared terms: cli, system, unix.

## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- pkgdb category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
