# 使用 Homebrew, apt, dnf, MacPorts, Nix, zypper 安装 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

- 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/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- 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/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## 软件包事实

- **软件包键:** brew:gpp
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/gpp>
- **版本:** 2.28
- **来源摘要:** General-purpose preprocessor with customizable syntax
- **主页:** <https://logological.org/gpp>
- **仓库:** <https://github.com/logological/gpp>
- **上游文档:** <https://logological.org/gpp>
- **许可证:** LGPL-3.0-only
- **源码归档:** <https://files.nothingisreal.com/software/gpp/gpp-2.28.tar.bz2>
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- gpp (cli)
- gpp (别名)

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 2.28
- 本地数据: OK
- 上游仓库: https://logological.org/gpp
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** gpp
- **Version Scheme:** 0
- **Revision:** 0
- **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 - 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-7.fc44: 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/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Customizable language-agnostic preprocessor | https://logological.org/gpp
- zypper - gpp - 2.28-1.7: normalized package name match | openSUSE Tumbleweed package metadata: gpp from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-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


## 相关链接

- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/zh-hans/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://www.automicvault.com/zh-hans/pkg/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [cppp](https://www.automicvault.com/zh-hans/pkg/brew/cppp/) - Shares av.db curated category or tags: cli, developer-tools, preprocessor, preprocessors.
- [fypp](https://www.automicvault.com/zh-hans/pkg/brew/fypp/) - Shares av.db curated category or tags: cli, developer-tools, preprocessor, preprocessors.
- [fmpp](https://www.automicvault.com/zh-hans/pkg/brew/fmpp/) - Shares av.db curated category or tags: cli, developer-tools, preprocessors, text-processing.
- [align](https://www.automicvault.com/zh-hans/pkg/brew/align/) - Shares av.db curated category or tags: cli, developer-tools, text-processing.
- [angle-grinder](https://www.automicvault.com/zh-hans/pkg/brew/angle-grinder/) - Shares av.db curated category or tags: cli, developer-tools, text-processing.
- [bsdconv](https://www.automicvault.com/zh-hans/pkg/brew/bsdconv/) - Shares av.db curated category or tags: cli, developer-tools, text-processing.
- [camlp5](https://www.automicvault.com/zh-hans/pkg/brew/camlp5/) - Shares av.db curated category or tags: cli, developer-tools, preprocessor.
- [cargo-expand](https://www.automicvault.com/zh-hans/pkg/brew/cargo-expand/) - Shares av.db curated category or tags: cli, developer-tools, macros.
- [smu](https://www.automicvault.com/zh-hans/pkg/brew/smu/) - Local package facts share a topical domain. Shared terms: cli, developer, developer-tools, processing, syntax.

## Combined YAML source

View the package source record on GitHub. [combined/gpp.yml](https://github.com/automic-vault/db/blob/main/combined/gpp.yml)


## 来源

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