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

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

## 安装

```sh
sudo av install brew:lcov
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install lcov
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install lcov
```

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

### Linux

- apk (92%):

```sh
sudo apk add lcov
```

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

- Debian apt (92%):

```sh
sudo apt install lcov
```

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

- dnf (92%):

```sh
sudo dnf install lcov
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#lcov
```

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

- pacman (92%):

```sh
sudo pacman -S lcov
```

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

- zypper (92%):

```sh
sudo zypper install lcov
```

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

### Windows

- Chocolatey (92%):

```sh
choco install lcov
```

  证据: Chocolatey community package catalog: lcov from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','kindle'

## 软件包事实

- **软件包键:** brew:lcov
- **软件包管理器:** Homebrew
- **版本:** 2.5
- **来源摘要:** Graphical front-end for GCC's coverage testing tool (gcov)
- **主页:** <https://github.com/linux-test-project/lcov>
- **仓库:** <https://github.com/linux-test-project/lcov>
- **最后更新:** 2026-07-07T08:09:46Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gendesc (别名)
- genhtml (别名)
- geninfo (别名)
- genpng (别名)
- lcov (别名)
- llvm2lcov (别名)
- perl2lcov (别名)
- py2lcov (别名)
- xml2lcov (别名)
- xml2lcovutil.py (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

LCOV is the Linux Test Project GCOV extension: a suite of Perl-oriented command-line tools that collect, transform, merge, filter, and render code coverage data, most famously as navigable HTML reports generated by `genhtml`.

### 项目历史

The LCOV README describes the project as a tool for manipulating and displaying what parts of a program were covered during tests. It began as a front end around GCC `gcov` output and was initially designed to support Linux kernel coverage measurements, while also working for ordinary user-space programs.

Over time LCOV expanded beyond GCC `gcov` text data. The README lists converters and support for coverage sources such as LLVM `llvm-cov`, Python Coverage.py, Cobertura-like XML, Perl Devel::Cover, and Jacoco-style workflows, along with differential coverage, date binning, owner binning, and spreadsheet/reporting support.

### 采用历史

LCOV became a common package in Unix developer toolchains because it gives C and C++ projects a simple path from compiler coverage flags to browsable HTML reports. It is packaged across Homebrew, Debian, Ubuntu, Fedora, Arch, Nix, MacPorts, Chocolatey, Alpine, and openSUSE-style ecosystems.

Its adoption also comes from CI and kernel-development workflows: coverage reports are easy to publish as artifacts, and LCOV trace files can be merged, filtered, and compared across test runs.

### 使用方式

Typical usage captures baseline or test coverage with `lcov` or `geninfo`, removes unwanted paths, merges trace files, and renders the result with `genhtml`. Related utilities convert data from Perl, Python, LLVM, and XML coverage formats into LCOV trace data.

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

LCOV matters to package nerds because it is one of the standard lingua franca formats and toolsets for coverage artifacts. Many packages, CI recipes, and dashboards understand LCOV trace files or HTML output even when the project itself uses a different compiler or language.

It is also a classic example of a packaging-friendly developer tool: script-based, manpage documented, configurable via system and user rc files, and useful both in local shells and noninteractive build farms.

### 时间线

- 2000s: LCOV originated in the Linux Test Project as a GCOV extension for kernel coverage measurement.
- 2022-06-03: Version 1.16 release published on GitHub.
- 2023-05-25: Version 2.0 release published.
- 2024-04-19: Version 2.1 release published.
- 2025-01-09: Version 2.3 release published.
- 2025-12-21: Version 2.4 release published.

### Related projects

- Related projects and formats include GCC `gcov`, LLVM `llvm-cov`, Linux Test Project, Coverage.py, Cobertura XML, Perl Devel::Cover, Jacoco, gcovr, CI coverage artifact publishing, and kernel coverage tooling.

### 来源

- <https://api.github.com/repos/linux-test-project/lcov/releases?per_page=20>
- <https://github.com/linux-test-project/lcov>
- <https://github.com/linux-test-project/lcov/tree/master/man>
- <https://raw.githubusercontent.com/linux-test-project/lcov/master/README.rst>
- <https://www.kernel.org/doc/html/v6.0/dev-tools/gcov.html>


## 安全说明

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: /etc/lcovrc, ~/.lcovrc
## 其他软件包管理器记录

- Debian apt - lcov - 2.3.1-1: normalized package name match | Debian stable package indexes: lcov from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Summarise Code coverage information from GCOV | https://github.com/linux-test-project/lcov
- Nix - lcov: normalized package name match | nixpkgs package indexes: pkgs/by-name/lc/lcov/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - lcov - 2.0-4ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: lcov from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Summarise Code coverage information from GCOV | https://github.com/linux-test-project/lcov.git
- apk - lcov - 2.3.1-r1: normalized package name match | Alpine Linux edge package indexes: lcov from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | LCOV is an extension to GCOV. It provides a graphical frontend for converage information | https://github.com/linux-test-project/lcov
- apk - lcov-doc - 2.3.1-r1: normalized package name match | Alpine Linux edge package indexes: lcov-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | LCOV is an extension to GCOV. It provides a graphical frontend for converage information (documentation) | https://github.com/linux-test-project/lcov
- dnf - lcov - 2.0-8.fc45: normalized package name match | Fedora Rawhide package metadata: lcov from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | LTP GCOV extension code coverage tool | https://github.com/linux-test-project/lcov/
- pacman - lcov - 2.5-1: normalized package name match | Arch Linux sync databases: lcov from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | front-end for GCC’s coverage testing tool gcov | https://github.com/linux-test-project/lcov
- zypper - lcov - 2.4-1.3: normalized package name match | openSUSE Tumbleweed package metadata: lcov from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A Graphical GCOV Front-end | https://github.com/linux-test-project/lcov
- zypper - lcov-example - 2.4-1.3: normalized package name match | openSUSE Tumbleweed package metadata: lcov-example from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Example for lcov | https://github.com/linux-test-project/lcov
- MacPorts - lcov: normalized package name match | MacPorts ports tree: devel/lcov/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - lcov: normalized package name match | Chocolatey community package catalog: lcov from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','kindle'


## Combined YAML source

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


## 来源

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