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

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

## 安装

```sh
sudo av install brew:valgrind
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install valgrind
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install valgrind
```

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

### Linux

- apk (92%):

```sh
sudo apk add valgrind
```

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

- Debian apt (92%):

```sh
sudo apt install valgrind
```

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

- dnf (92%):

```sh
sudo dnf install valgrind
```

  证据: Fedora Rawhide package metadata: valgrind 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#valgrind
```

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

- pacman (92%):

```sh
sudo pacman -S valgrind
```

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

- zypper (92%):

```sh
sudo zypper install valgrind
```

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

## 软件包事实

- **软件包键:** brew:valgrind
- **软件包管理器:** Homebrew
- **版本:** 3.27.1
- **来源摘要:** Dynamic analysis tools (memory, debug, profiling)
- **主页:** <https://www.valgrind.org/>
- **最后更新:** 2026-05-20T16:57:52Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- callgrind_annotate (别名)
- callgrind_control (别名)
- cg_annotate (别名)
- cg_diff (别名)
- cg_merge (别名)
- ms_print (别名)
- valgrind (别名)
- valgrind-di-server (别名)
- valgrind-listener (别名)
- vgdb (别名)
- vgstack (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Valgrind began as Julian Seward's attempt to build an open source memory-checking tool for x86/Linux in the spirit of Purify, but without source rewriting or relinking. Nicholas Nethercote's twentieth-anniversary retrospective places the first 1.0 release in July 2002, after early use by KDE developers, and notes that Cachegrind was committed in April 2002. Soon afterward the project split its generic dynamic-binary-instrumentation engine from individual analysis tools: the original memory checker became Memcheck, while Valgrind became the overall framework.

### 项目历史

That split shaped Valgrind's long-term role. The official manual describes it as an instrumentation framework with standard tools including Memcheck for C/C++ memory errors, Cachegrind and Callgrind for cache/call profiling, Helgrind and DRD for thread errors, Massif and DHAT for heap profiling, plus smaller developer and research tools. This made Valgrind both a daily debugging command and a platform for building heavyweight dynamic-analysis experiments.

The project also became influential research and infrastructure. Nethercote records papers on Memcheck's bit-precise undefined-value tracking and Valgrind's heavyweight instrumentation architecture, and notes that later tools such as AddressSanitizer were inspired by Memcheck while making different speed/coverage tradeoffs. By the 2010s Seward and Nethercote had moved into emeritus roles, with many other contributors and Mark Wielaard as lead maintainer, but Valgrind remained a reference tool for deep user-space dynamic analysis.

### 采用历史

Adoption followed the places where native-code correctness bugs are expensive: C and C++ applications, libraries, language runtimes, databases, browsers, scientific programs, embedded software, and automated regression suites. The Valgrind site emphasizes that it works on existing binaries without recompilation and that it has been used on projects ranging from personal code to very large codebases. Its standard package-nerd usage remains direct and boring: compile with debug symbols, run a program under `valgrind` or a selected `--tool`, inspect source-mapped diagnostics, and, for CI or release checks, fail builds on leaks, invalid accesses, or concurrency issues.

### 使用方式

Adoption followed the places where native-code correctness bugs are expensive: C and C++ applications, libraries, language runtimes, databases, browsers, scientific programs, embedded software, and automated regression suites. The Valgrind site emphasizes that it works on existing binaries without recompilation and that it has been used on projects ranging from personal code to very large codebases. Its standard package-nerd usage remains direct and boring: compile with debug symbols, run a program under `valgrind` or a selected `--tool`, inspect source-mapped diagnostics, and, for CI or release checks, fail builds on leaks, invalid accesses, or concurrency issues.

### 来源

- <https://nnethercote.github.io/2022/07/27/twenty-years-of-valgrind.html>
- <https://valgrind.org/docs/manual/valgrind_manual.pdf>
- <https://valgrind.org/info/about.html>


## 安全说明

没有找到 valgrind 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


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

- Debian apt - valgrind - 1:3.24.0-3: normalized package name match | Debian stable package indexes: valgrind from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | instrumentation framework for building dynamic analysis tools | https://www.valgrind.org/
- Debian apt - valgrind-mpi - 1:3.24.0-3: normalized package name match | Debian stable package indexes: valgrind-mpi from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | instrumentation framework for building dynamic analysis tools (MPI module) | https://www.valgrind.org/
- Nix - valgrind: normalized package name match | nixpkgs package indexes: pkgs/by-name/va/valgrind/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - valgrind - 1:3.22.0-0ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: valgrind from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | instrumentation framework for building dynamic analysis tools | https://www.valgrind.org/
- Ubuntu apt - valgrind-mpi - 1:3.22.0-0ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: valgrind-mpi from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | instrumentation framework for building dynamic analysis tools (MPI module) | https://www.valgrind.org/
- apk - valgrind - 3.25.1-r2: normalized package name match | Alpine Linux edge package indexes: valgrind from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Tool to help find memory-management problems in programs | https://valgrind.org/
- apk - valgrind-dev - 3.25.1-r2: normalized package name match | Alpine Linux edge package indexes: valgrind-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Tool to help find memory-management problems in programs (development files) | https://valgrind.org/
- apk - valgrind-doc - 3.25.1-r2: normalized package name match | Alpine Linux edge package indexes: valgrind-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Tool to help find memory-management problems in programs (documentation) | https://valgrind.org/
- apk - valgrind-scripts - 3.25.1-r2: normalized package name match | Alpine Linux edge package indexes: valgrind-scripts from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Tool to help find memory-management problems in programs (perl+python cachegrind/callgrind script tools) | https://valgrind.org/
- dnf - valgrind - 3.27.1-2.fc45: normalized package name match | Fedora Rawhide package metadata: valgrind from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Dynamic analysis tools to detect memory or thread bugs and profile | https://www.valgrind.org/
- dnf - valgrind-devel - 3.27.1-2.fc45: normalized package name match | Fedora Rawhide package metadata: valgrind-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for valgrind aware programs | https://www.valgrind.org/
- dnf - valgrind-docs - 3.27.1-2.fc45: normalized package name match | Fedora Rawhide package metadata: valgrind-docs from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Documentation for valgrind tools, scripts and gdb integration | https://www.valgrind.org/
- dnf - valgrind-gdb - 3.27.1-2.fc45: normalized package name match | Fedora Rawhide package metadata: valgrind-gdb from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Tools for integrating valgrind and gdb | https://www.valgrind.org/
- dnf - valgrind-openmpi - 3.27.1-2.fc45: normalized package name match | Fedora Rawhide package metadata: valgrind-openmpi from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | OpenMPI support for valgrind | https://www.valgrind.org/
- dnf - valgrind-scripts - 3.27.1-2.fc45: normalized package name match | Fedora Rawhide package metadata: valgrind-scripts from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Scripts for post-processing valgrind tool output | https://www.valgrind.org/
- dnf - valgrind-tools-devel - 3.27.1-2.fc45: normalized package name match | Fedora Rawhide package metadata: valgrind-tools-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for building valgrind tools. | https://www.valgrind.org/


## Combined YAML source

View the package source record on GitHub. [combined/valgrind.yml](https://github.com/mxcl/pkgdb/blob/main/combined/valgrind.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
