# 使用 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
- **版本:** 2.7.2
- **来源摘要:** Alternative C/C++ preprocessor
- **主页:** <https://mcpp.sourceforge.net/>
- **最后更新:** 2026-06-19T12:32:39-07:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- mcpp (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

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

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

- 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


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