# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper 安装 gcovr

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

## 安装

```sh
sudo av install brew:gcovr
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gcovr
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gcovr
```

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

### Linux

- apk (92%):

```sh
sudo apk add gcovr
```

  证据: Alpine Linux edge package indexes: gcovr from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install gcovr
```

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

- dnf (92%):

```sh
sudo dnf install gcovr
```

  证据: Fedora Rawhide package metadata: gcovr from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#gcovr
```

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

- pacman (92%):

```sh
sudo pacman -S gcovr
```

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

- zypper (92%):

```sh
sudo zypper install gcovr
```

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

## 软件包事实

- **软件包键:** brew:gcovr
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/gcovr>
- **版本:** 8.6
- **来源摘要:** Reports from gcov test coverage program
- **主页:** <https://gcovr.com/>
- **仓库:** <https://github.com/gcovr/gcovr>
- **上游文档:** <https://gcovr.com/>
- **许可证:** BSD-3-Clause
- **源码归档:** <https://files.pythonhosted.org/packages/07/37/b4a87dff166dc0a5002e9d03fcb6ca8eeff048247b011b67f047e31122c9/gcovr-8.6.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- gcovr (cli)
- gcovr (别名)

## 依赖

- python@3.14

## macOS 提供的库

- libxml2
- libxslt

## 安装行为

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

## 版本和新鲜度

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

gcovr is a Python-based coverage reporting tool for GCC/gcov data. It turns compiler coverage output into human and machine-readable reports, including text, HTML, CSV, JSON, Cobertura, Coveralls, SonarQube, JaCoCo, and LCOV formats.

### 项目历史

The official changelog traces gcovr releases back to version 2.0 on 22 August 2010. The current GitHub repository was created in May 2013 and describes the project as generating code coverage reports with gcc/gcov.

### 采用历史

gcovr became a common packaging target because it sits at a practical boundary between C/C++ test builds and CI coverage dashboards. Its documentation focuses on command-line operation, configuration files, filtering, reproducible timestamps, and multiple report formats, which are all package-manager-friendly workflows.

### 使用方式

Typical use is to compile code with coverage flags, run tests, and invoke gcovr from a project root to collect gcov data and emit reports. The configuration file support lets repeatable coverage options live in a repository instead of only in CI shell scripts.

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

gcovr matters because it gives gcov users a single small CLI for report formats expected by CI systems and code-quality services. It is a bridge package: not a compiler, not a test framework, but the adapter that makes compiler-native coverage data useful to modern automation.

### 时间线

- 2010: The official changelog records gcovr 2.0.
- 2013: GitHub records the gcovr repository creation.
- 2018: gcovr 4.0 appears in the official changelog.
- 2021: gcovr 5.0 appears in the official changelog.
- 2024: gcovr 8.0 appears in the official changelog.
- 2026: gcovr 8.6 is documented with Python 3.14 support and Python 3.9 support dropped.

### Related projects

- GCC and gcov provide the compiler and raw coverage data that gcovr processes.
- LCOV, Cobertura, Coveralls, SonarQube, and JaCoCo are report ecosystems supported by gcovr output formats.
- Python is the implementation and packaging ecosystem for the gcovr CLI.

### 来源

- <https://api.github.com/repos/gcovr/gcovr>
- <https://gcovr.com/en/stable>
- <https://gcovr.com/en/stable/changelog.html>
- <https://gcovr.com/en/stable/guide.html>
- <https://github.com/gcovr/gcovr>


## 安全说明

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: gcovr.cfg in the -r/--root directory
## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** gcovr
- **Version Scheme:** 0
- **Revision:** 2
- **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 - gcovr - 7.2+really-1.1: normalized package name match | Debian stable package indexes: gcovr from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Manages the compilation of coverage information from gcov | http://gcovr.com/
- Nix - gcovr: normalized package name match | nixpkgs package indexes: pkgs/by-name/gc/gcovr/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gcovr - 7.0-1: normalized package name match | Ubuntu 24.04 LTS package indexes: gcovr from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Manages the compilation of coverage information from gcov | http://gcovr.com/
- apk - gcovr - 8.6-r1: normalized package name match | Alpine Linux edge package indexes: gcovr from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Generates a simple report that summarizes the gcc code coverage | http://gcovr.com/
- apk - gcovr-pyc - 8.6-r1: normalized package name match | Alpine Linux edge package indexes: gcovr-pyc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Precompiled Python bytecode for gcovr | http://gcovr.com/
- dnf - gcovr - 8.6-3.fc45: normalized package name match | Fedora Rawhide package metadata: gcovr from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | A code coverage report generator using GNU gcov | https://gcovr.com/
- dnf - gcovr-doc - 8.6-3.fc45: normalized package name match | Fedora Rawhide package metadata: gcovr-doc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Documentation of gcovr | https://gcovr.com/
- pacman - gcovr - 8.6-1: normalized package name match | Arch Linux sync databases: gcovr from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | provides a utility for managing the use of the GNU gcov utility | https://gcovr.com/
- zypper - gcovr - 6.0-1.9: normalized package name match | openSUSE Tumbleweed package metadata: gcovr from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A code coverage report generator using GNU gcov | https://gcovr.com/
- zypper - gcovr-doc - 6.0-1.9: normalized package name match | openSUSE Tumbleweed package metadata: gcovr-doc from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Documentation of gcovr | https://gcovr.com/
- MacPorts - gcovr: normalized package name match | MacPorts ports tree: devel/gcovr/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.
- [python@3.14](https://pkg.so/zh-hans/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [lcov](https://pkg.so/zh-hans/brew/lcov/) - Shares pkgdb curated category or tags: cli, coverage, developer-tools, gcov, testing.
- [allure](https://pkg.so/zh-hans/brew/allure/) - Shares pkgdb curated category or tags: cli, developer-tools, reports, testing.
- [kcov](https://pkg.so/zh-hans/brew/kcov/) - Shares pkgdb curated category or tags: cli, coverage, developer-tools, testing.
- [pytest](https://pkg.so/zh-hans/brew/pytest/) - Shares pkgdb curated category or tags: cli, developer-tools, python, testing.
- [tox](https://pkg.so/zh-hans/brew/tox/) - Shares pkgdb curated category or tags: cli, developer-tools, python, testing.
- [adb-enhanced](https://pkg.so/zh-hans/brew/adb-enhanced/) - Shares pkgdb curated category or tags: cli, developer-tools, python, testing.
- [locust](https://pkg.so/zh-hans/brew/locust/) - Shares pkgdb curated category or tags: cli, developer-tools, python, testing.
- [robot-framework](https://pkg.so/zh-hans/brew/robot-framework/) - Shares pkgdb curated category or tags: cli, developer-tools, python, testing.
- [mongo-orchestration](https://pkg.so/zh-hans/brew/mongo-orchestration/) - Both packages touch the same language runtime or ecosystem. Shared terms: cli, developer, developer-tools, python, python-3-14.

## Combined YAML source

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


## 来源

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