# 使用 Homebrew, apt, MacPorts, Nix, zypper, dnf 安装 gpp

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

## 安装

```sh
sudo av install brew:gpp
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gpp
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gpp
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install gpp
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#gpp
```

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

- zypper (92%):

```sh
sudo zypper install gpp
```

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

- dnf (92%):

```sh
sudo dnf install general-purpose-preprocessor
```

  证据: Fedora Rawhide package metadata: general-purpose-preprocessor from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst

## 软件包事实

- **软件包键:** brew:gpp
- **软件包管理器:** Homebrew
- **版本:** 2.28
- **来源摘要:** General-purpose preprocessor with customizable syntax
- **主页:** <https://logological.org/gpp>
- **仓库:** <https://github.com/logological/gpp>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gpp (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

GPP is a general-purpose preprocessor with customizable syntax. The project README and citation metadata emphasize that it is independent of any one programming language, lighter than GNU m4 for many tasks, and includes built-in macro support for C/C++, LaTeX, HTML, XHTML, and Prolog files.

### 项目历史

The GitHub repository is the official development location and the project homepage links users to online documentation, portable source packages, and binary-package references. The repository includes source, documentation, Autotools files, license files, and citation metadata.

GPP has academic documentation as well as package metadata: its CITATION.cff points to a 2020 Journal of Open Source Software article by Tristan Miller and Denis Auroux describing it as an extensible, customizable preprocessor for software development, document processing, and research workflows.

### 采用历史

The input package-manager facts list Homebrew, Debian, Fedora, MacPorts, Nix, Ubuntu, and openSUSE packages. That spread fits a small C command-line tool that is useful in build pipelines and documentation generation without needing a runtime service.

Homebrew packages it as gpp, Fedora uses the more descriptive general-purpose-preprocessor name, and the official README points users to binary-package links on the project homepage.

### 使用方式

Users invoke gpp to preprocess text with syntax tuned to the target language or document format. The README notes that the documentation itself is generated by GPP from a gpp.pp input file, making the docs both reference material and a working example.

The package is most useful when cpp is too language-specific and m4 is heavier than needed: templating LaTeX or HTML, defining domain-specific macro syntax, or generating source fragments in build systems.

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

GPP is a compact example of a Unix filter that earns packaging despite a small footprint: it has a single executable, man/HTML documentation, portable source releases, and a stable niche that overlaps build systems, documentation, and research tooling.

Its significance is less about popularity and more about substitutability: package users can reach for it when they need a configurable macro processor without bringing in a full template engine or language-specific preprocessor.

### 时间线

- 2020: The project citation metadata records a Journal of Open Source Software article for GPP.
- 2023: GitHub release metadata records GPP 2.28 dated Sep 26, 2023.
- 2026: Homebrew metadata packages GPP as version 2.28 with bottles for macOS and Linux.

### Related projects

- cpp is the language-specific baseline that GPP explicitly contrasts with.
- GNU m4 is the heavier general macro processor that GPP positions itself beside.
- Autotools-style source packages are related operationally because the development checkout requires generating the build system before end-user installation steps apply.

### 来源

- <https://formulae.brew.sh/formula/gpp>
- <https://github.com/logological/gpp>
- <https://logological.org/gpp>
- <https://raw.githubusercontent.com/logological/gpp/master/CITATION.cff>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - gpp - 2.28-2: normalized package name match | Debian stable package indexes: gpp from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | general-purpose preprocessor with customizable syntax | https://logological.org/gpp
- Nix - gpp: normalized package name match | nixpkgs package indexes: pkgs/by-name/gp/gpp/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gpp - 2.28-1: normalized package name match | Ubuntu 24.04 LTS package indexes: gpp from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | general-purpose preprocessor with customizable syntax | https://logological.org/gpp
- dnf - general-purpose-preprocessor - 2.28-8.fc45: normalized package name match | Fedora Rawhide package metadata: general-purpose-preprocessor from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Customizable language-agnostic preprocessor | https://logological.org/gpp
- zypper - gpp - 2.28-1.9: normalized package name match | openSUSE Tumbleweed package metadata: gpp from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Generic Preprocessor | https://logological.org/gpp/
- MacPorts - gpp: normalized package name match | MacPorts ports tree: lang/gpp/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/gpp.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gpp.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
