# 使用 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **版本:** 1.14.6
- **来源摘要:** UNIX manpage compiler toolset
- **主页:** <https://mandoc.bsd.lv/>
- **最后更新:** 2026-07-17T20:55:00-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

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

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

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
## 其他软件包管理器记录

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


## 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
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
