# 使用 Homebrew, apt, MacPorts, Nix, pacman, zypper 安装 mcpp

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

## 安装

```sh
sudo av install brew:mcpp
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mcpp
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mcpp
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install mcpp
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#mcpp
```

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

- pacman (92%):

```sh
sudo pacman -S mcpp
```

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

- zypper (92%):

```sh
sudo zypper install mcpp
```

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

## 软件包事实

- **软件包键:** brew:mcpp
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/mcpp>
- **版本:** 2.7.2
- **来源摘要:** Alternative C/C++ preprocessor
- **主页:** <https://mcpp.sourceforge.net/>
- **上游文档:** <https://mcpp.sourceforge.net/>
- **许可证:** BSD-2-Clause
- **源码归档:** <https://downloads.sourceforge.net/project/mcpp/mcpp/V.2.7.2/mcpp-2.7.2.tar.gz>
- **最后更新:** 2026-06-19T12:32:39-07:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- mcpp (cli)
- mcpp (别名)

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## 版本和新鲜度

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

mcpp is a portable C/C++ preprocessor and validation suite by Kiyoshi Matsui. The official site describes it as an independent preprocessor that implements C90, C99, and C++98 preprocessing behavior, provides diagnostics, and can be built as a compiler-specific preprocessor, a compiler-independent command, or a subroutine library.

### 项目历史

The project was created to address portability and conformance problems in traditional compiler-bundled preprocessors. Its official homepage says mcpp was selected for Japan IPA's Exploratory Software Projects in both 2002 and 2003.

The public SourceForge-hosted project surface dates from April 2006, and the official homepage lists V.2.7.2 from November 2008 as the latest release.

### 采用历史

mcpp was packaged both as upstream binary archives and by operating-system distributions. The official download page documents FreeBSD, Linux RPM and deb, Mac OS X, and Windows packages, and separately notes distribution packages for Fedora, Debian, Ubuntu, OpenSUSE, Gentoo, Slackware, and MacPorts.

Distribution packaging split the executable, shared library, development files, and documentation on Fedora and Debian-family systems, which made mcpp useful as a reusable compiler-toolchain component rather than only as a standalone command.

### 使用方式

The command-line program is installed as `mcpp`. The official download page points users to the bundled manual and explains that source archives include source code, a validation suite, and English and Japanese documentation.

Typical package-manager usage is installing a small preprocessor tool or library for C/C++ toolchains, conformance testing, macro debugging, or historical build compatibility.

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

mcpp matters to package nerds because it is a small compiler component that was packaged independently of a full compiler. Its history includes classic Unix packaging patterns: source tarballs, RPMs, debs, ports, a shared library package, development headers, and documentation packages.

It is also a useful example of an important package whose official presence is an old project homepage and release archive rather than a modern canonical Git repository.

### 时间线

- 2002: Selected for IPA Exploratory Software Projects.
- 2003: Selected again for IPA Exploratory Software Projects.
- 2006-04: Project located on SourceForge.
- 2008-11: V.2.7.2 released.

### Related projects

- mcpp is related to GCC, Visual C++, C and C++ compiler toolchains, and distribution packages such as `mcpp`, `libmcpp`, `libmcpp-dev`, and `mcpp-doc`.

### 来源

- <https://mcpp.sourceforge.net/>
- <https://mcpp.sourceforge.net/download.html>


## 安全说明

narrow executable package without higher-risk signals.

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** mcpp
- **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 - libmcpp-dev - 2.7.2-5.2: normalized package name match | Debian stable package indexes: libmcpp-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Alternative C/C++ preprocessor (development files) | http://mcpp.sourceforge.net/
- Debian apt - libmcpp0 - 2.7.2-5.2: normalized package name match | Debian stable package indexes: libmcpp0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Alternative C/C++ preprocessor (shared library) | http://mcpp.sourceforge.net/
- Debian apt - mcpp - 2.7.2-5.2: normalized package name match | Debian stable package indexes: mcpp from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Alternative C/C++ preprocessor | http://mcpp.sourceforge.net/
- Debian apt - mcpp-doc - 2.7.2-5.2: normalized package name match | Debian stable package indexes: mcpp-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Alternative C/C++ preprocessor (manual) | http://mcpp.sourceforge.net/
- Nix - mcpp: normalized package name match | nixpkgs package indexes: pkgs/by-name/mc/mcpp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libmcpp-dev - 2.7.2-5.1: normalized package name match | Ubuntu 24.04 LTS package indexes: libmcpp-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Alternative C/C++ preprocessor (development files) | http://mcpp.sourceforge.net/
- Ubuntu apt - libmcpp0 - 2.7.2-5.1: normalized package name match | Ubuntu 24.04 LTS package indexes: libmcpp0 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Alternative C/C++ preprocessor (shared library) | http://mcpp.sourceforge.net/
- Ubuntu apt - mcpp - 2.7.2-5.1: normalized package name match | Ubuntu 24.04 LTS package indexes: mcpp from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Alternative C/C++ preprocessor | http://mcpp.sourceforge.net/
- Ubuntu apt - mcpp-doc - 2.7.2-5.1: normalized package name match | Ubuntu 24.04 LTS package indexes: mcpp-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Alternative C/C++ preprocessor (manual) | http://mcpp.sourceforge.net/
- pacman - mcpp - 2.7.2.3-1: normalized package name match | Arch Linux sync databases: mcpp from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Matsui's CPP implementation precisely conformed to standards | http://mcpp.sourceforge.net
- zypper - libmcpp0 - 2.7.2.2-1.5: normalized package name match | openSUSE Tumbleweed package metadata: libmcpp0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | The shared library of Matsui's C Preprocessor | https://mcpp.sourceforge.net/
- zypper - mcpp - 2.7.2.2-1.5: normalized package name match | openSUSE Tumbleweed package metadata: mcpp from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Matsui's C Preprocessor | https://mcpp.sourceforge.net/
- zypper - mcpp-devel - 2.7.2.2-1.5: normalized package name match | openSUSE Tumbleweed package metadata: mcpp-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for mcpp | https://mcpp.sourceforge.net/
- MacPorts - mcpp: normalized package name match | MacPorts ports tree: devel/mcpp/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.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing 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.
- [ice](https://pkg.so/zh-hans/brew/ice/) - Popular package that depends on this formula.
- [byacc](https://pkg.so/zh-hans/brew/byacc/) - Shares pkgdb curated category or tags: c, cli, compiler-tools, developer-tools.
- [bison](https://pkg.so/zh-hans/brew/bison/) - Shares pkgdb curated category or tags: cli, compiler-tools, developer-tools.
- [re2c](https://pkg.so/zh-hans/brew/re2c/) - Shares pkgdb curated category or tags: cli, compiler-tools, developer-tools.
- [lit](https://pkg.so/zh-hans/brew/lit/) - Shares pkgdb curated category or tags: cli, compiler-tools, developer-tools.
- [antlr](https://pkg.so/zh-hans/brew/antlr/) - Shares pkgdb curated category or tags: cli, compiler-tools, developer-tools.
- [ccache](https://pkg.so/zh-hans/brew/ccache/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [swig](https://pkg.so/zh-hans/brew/swig/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [gdb](https://pkg.so/zh-hans/brew/gdb/) - Shares pkgdb curated category or tags: c, c-plus-plus, cli, developer-tools.
- [aarch64-elf-gcc](https://pkg.so/zh-hans/brew/aarch64-elf-gcc/) - Local package facts share a topical domain. Shared terms: c, c-plus-plus, cli, compiler, developer.
- [alive2](https://pkg.so/zh-hans/brew/alive2/) - Local package facts share a topical domain. Shared terms: cli, compiler, compiler-tools, developer, developer-tools.

## Combined YAML source

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


## 来源

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