# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper, scoop 安装 mandoc

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

## 安装

```sh
sudo av install brew:mandoc
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mandoc
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mandoc
```

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

### Linux

- apk (92%):

```sh
sudo apk add mandoc
```

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

- Debian apt (92%):

```sh
sudo apt install mandoc
```

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

- dnf (92%):

```sh
sudo dnf install mandoc
```

  证据: Fedora Rawhide package metadata: mandoc 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#mandoc
```

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

- pacman (92%):

```sh
sudo pacman -S mandoc
```

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

- zypper (92%):

```sh
sudo zypper install mandoc
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/mandoc
```

  证据: Scoop official bucket manifest trees: bucket/mandoc.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:mandoc
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/mandoc>
- **版本:** 1.14.6
- **来源摘要:** UNIX manpage compiler toolset
- **主页:** <https://mandoc.bsd.lv/>
- **上游文档:** <https://mandoc.bsd.lv/>
- **许可证:** ISC
- **源码归档:** <https://mandoc.bsd.lv/snapshots/mandoc-1.14.6.tar.gz>
- **最后更新:** 2026-07-17T20:55:00-04:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- bsdapropos (cli)
- bsdmakewhatis (cli)
- bsdman (cli)
- bsdsoelim (cli)
- bsdwhatis (cli)
- demandoc (cli)
- mandoc (cli)
- bsdapropos (别名)
- bsdmakewhatis (别名)
- bsdman (别名)
- bsdsoelim (别名)
- bsdwhatis (别名)
- demandoc (别名)
- mandoc (别名)

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.14.6
- 管理器更新时间: 2026-07-17
- 本地数据: OK
- 上游仓库: https://mandoc.bsd.lv/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

mandoc is a small, ISC-licensed Unix manual-page compiler toolset. Its official site describes it as compiling `mdoc`, `man`, and related roff manual sources to terminal output, HTML 5, PostScript, and PDF, with development centered on OpenBSD and BSD.lv.

### 项目历史

The mandoc development history traces the project through the older `mdocml` name and rapid 2009 development by Kristaps Dzonsons, including releases around March and April 2009 and OpenBSD integration work. The `mandoc` name replaced `mdocterm` in March 2009, and the tool became closely associated with OpenBSD integration after cooperation between Kristaps Dzonsons and Ingo Schwarze.

The mandoc utility first appeared in OpenBSD 4.8. Over time it grew from a focused `mdoc` formatter into a broader toolset including `mandoc`, `man`, `apropos`, `makewhatis`, `catman`, `demandoc`, CGI support, database support, linting, HTML output, markdown output for `mdoc`, and related developer-facing libraries.

### 采用历史

The official packages and ports page records broad adoption across BSDs and Linux distributions. OpenBSD bundled mandoc in the base system in 2010 and made it the default formatter, searcher, and viewer over later milestones; FreeBSD, NetBSD, DragonFly BSD, illumos, macOS, Alpine, Void, Debian, Ubuntu, Fedora, openSUSE, Gentoo, NixOS, and others have packages or integrations.

That adoption matters because mandoc is not just another formatter: on several systems it replaces or complements groff/man-db for everyday `man` and `apropos` usage, making it part of the base documentation experience.

### 使用方式

At the CLI, `mandoc` reads `mdoc` or `man` input from files or stdin, auto-detects the language, and formats it for terminal display or other outputs. Output modes include ASCII, locale, UTF-8, HTML, man, markdown for `mdoc`, PDF, PostScript, and parse-tree output.

The `man.conf` manual documents `/etc/man.conf` as the configuration file for the mandoc-family `man`, `apropos`, and `makewhatis` utilities. Its directives can set manual search paths and output options, and the file is optional.

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

mandoc is significant to package maintainers because it is a lean alternative to full troff/groff stacks for manual-page rendering and validation. It is small, fast, portable C, and its linting helps find bad manual-page markup before packages ship.

It also has practical downstream impact: whether a system uses mandoc, man-db, groff, or a combination changes man-page rendering, HTML generation, apropos databases, and default configuration files.

### 时间线

- 2009: `mdocterm` was renamed to `mandoc` during early development.
- 2009: OpenBSD imported mandoc 1.7.12 and began closer integration work.
- 2010: mandoc first appeared in OpenBSD 4.8.
- 2014: OpenBSD switched man(1) to the mandoc implementation.
- 2017: mandoc 1.14.2 added `-Tmarkdown` and other features.
- 2021: mandoc 1.14.6 was released with improved tagging and a new `mdoc(7)` macro.

### Related projects

- mandoc is closely related to OpenBSD manual infrastructure, BSD.lv, `mdoc`, `man`, `roff`, `tbl`, `eqn`, `apropos`, and `makewhatis`.
- It is often compared with groff and man-db, and it powers or influences several manual-page web and package documentation tools.

### 来源

- <https://mandoc.bsd.lv/>
- <https://mandoc.bsd.lv/devhistory.html>
- <https://mandoc.bsd.lv/man/man.conf.5.html>
- <https://mandoc.bsd.lv/man/mandoc.1.html>
- <https://mandoc.bsd.lv/ports.html>


## 安全说明

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: /etc/man.conf
## 源数据库详情

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

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

- Debian apt - mandoc - 1.14.6-4: normalized package name match | Debian stable package indexes: mandoc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | BSD manpage compiler toolset | https://mandoc.bsd.lv
- Nix - mandoc: normalized package name match | nixpkgs package indexes: pkgs/by-name/ma/mandoc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - mandoc - 1.14.6-1: normalized package name match | Ubuntu 24.04 LTS package indexes: mandoc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | BSD manpage compiler toolset | http://mdocml.bsd.lv/
- apk - mandoc - 1.14.6-r15: normalized package name match | Alpine Linux edge package indexes: mandoc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | mandoc (formerly mdocml) UNIX manpage compiler toolset | https://mandoc.bsd.lv/
- apk - mandoc-apropos - 1.14.6-r15: normalized package name match | Alpine Linux edge package indexes: mandoc-apropos from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | makewhatis/whatis and apropos tools and index | https://mandoc.bsd.lv/
- apk - mandoc-dev - 1.14.6-r15: normalized package name match | Alpine Linux edge package indexes: mandoc-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | mandoc (formerly mdocml) UNIX manpage compiler toolset (development files) | https://mandoc.bsd.lv/
- apk - mandoc-doc - 1.14.6-r15: normalized package name match | Alpine Linux edge package indexes: mandoc-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | mandoc (formerly mdocml) UNIX manpage compiler toolset (documentation) | https://mandoc.bsd.lv/
- apk - mandoc-soelim - 1.14.6-r15: normalized package name match | Alpine Linux edge package indexes: mandoc-soelim from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | so elimination tool | https://mandoc.bsd.lv/
- dnf - libmandoc-devel - 1.14.6-14.fc45: normalized package name match | Fedora Rawhide package metadata: libmandoc-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Development libraries and headers for libmandoc | https://mandoc.bsd.lv/
- dnf - mandoc - 1.14.6-14.fc45: normalized package name match | Fedora Rawhide package metadata: mandoc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | A suite of tools for compiling mdoc and man | https://mandoc.bsd.lv/
- pacman - mandoc - 1.14.6-5: normalized package name match | Arch Linux sync databases: mandoc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A suite of tools compiling mdoc from the OpenBSD project | https://mdocml.bsd.lv
- zypper - mandoc - 1.14.6-7.5: normalized package name match | openSUSE Tumbleweed package metadata: mandoc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | UNIX manpage compiler | http://mandoc.bsd.lv/
- zypper - mandoc-bin - 1.14.6-7.5: normalized package name match | openSUSE Tumbleweed package metadata: mandoc-bin from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Format manual pages | http://mandoc.bsd.lv/
- MacPorts - mandoc: normalized package name match | MacPorts ports tree: textproc/mandoc/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/mandoc: normalized package name match | Scoop official bucket manifest trees: bucket/mandoc.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [man-db](https://pkg.so/zh-hans/brew/man-db/) - 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.
- [xkbcomp](https://pkg.so/zh-hans/brew/xkbcomp/) - Shares pkgdb curated category or tags: cli, compiler, system.
- [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.
- [acpica](https://pkg.so/zh-hans/brew/acpica/) - Local package facts share a topical domain. Shared terms: cli, compiler, system.

## Combined YAML source

View the package source record on GitHub. [combined/mandoc.yml](https://github.com/mxcl/pkgdb/blob/main/combined/mandoc.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
