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

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

## 安装

```sh
sudo av install brew:sparse
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install sparse
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add sparse
```

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

- Debian apt (92%):

```sh
sudo apt install sparse
```

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

- dnf (92%):

```sh
sudo dnf install sparse
```

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

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

- pacman (92%):

```sh
sudo pacman -S sparse
```

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

- zypper (92%):

```sh
sudo zypper install sparse
```

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

## 软件包事实

- **软件包键:** brew:sparse
- **软件包管理器:** Homebrew
- **版本:** 0.6.4
- **来源摘要:** Static C code analysis tool
- **主页:** <https://sparse.wiki.kernel.org/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cgcc (别名)
- sparse (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Sparse is a semantic parser and static-analysis tool for C, historically tied to Linux kernel development. It parses much of ANSI C plus many GCC extensions and uses annotations to catch mistakes such as incorrect address-space pointer use.

### 项目历史

The official documentation says Linus Torvalds started writing Sparse in 2003, initially targeting issues such as mixing user-space and kernel-space pointers. It also records maintainer handoffs to Josh Triplett in 2006, Christopher Li in 2009, and Luc Van Oostenryck in late 2018.

### 采用历史

Sparse's adoption is rooted in kernel and low-level C workflows rather than general application development. Its official documentation points contributors to the linux-sparse mailing list, kernel.org Git repository, release tarballs, and kernel bug tracker, while the supplied package data shows distribution through many Unix package managers.

### 使用方式

Users build Sparse from the kernel.org Git repository with `make` and `make install`, or install it from a system package manager. The `sparse` analyzer and `cgcc` wrapper are used to check C code with Sparse's type and annotation system.

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

Sparse matters to package nerds because it is old-school kernel infrastructure that still behaves like a classic Unix developer tool: source releases, mailing-list development, a kernel.org Git repository, manpage-like docs, and wide distro packaging. It also demonstrates how static-analysis tools become part of build and packaging QA culture.

### 时间线

- 2003: Linus Torvalds started Sparse, according to the official documentation.
- 2006: Josh Triplett became the first maintainer, and v0.1 is listed in the official release notes.
- 2009: Christopher Li became maintainer.
- 2018: Luc Van Oostenryck became maintainer in late 2018.
- 2021: v0.6.4 release listed in official release notes.

### Related projects

- Sparse is closely associated with the Linux kernel, GCC-style C extensions, kernel address-space annotations, and other static-analysis or compiler-front-end tooling for C.

### 来源

- <https://git.kernel.org/pub/scm/devel/sparse/sparse.git/>
- <https://sparse.docs.kernel.org/en/latest/>
- <https://sparse.docs.kernel.org/en/latest/release-notes/index.html>
- input.source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - sparse - 0.6.4-5: normalized package name match | Debian stable package indexes: sparse from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | semantic parser of source files | https://sparse.wiki.kernel.org/
- Debian apt - sparse-test-inspect - 0.6.4-5: normalized package name match | Debian stable package indexes: sparse-test-inspect from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | semantic parser of source files | https://sparse.wiki.kernel.org/
- Nix - sparse: normalized package name match | nixpkgs package indexes: pkgs/by-name/sp/sparse/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - sparse - 0.6.4-4ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: sparse from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | semantic parser of source files | https://sparse.wiki.kernel.org/
- Ubuntu apt - sparse-test-inspect - 0.6.4-4ubuntu3: normalized package name match | Ubuntu 24.04 LTS package indexes: sparse-test-inspect from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | semantic parser of source files | https://sparse.wiki.kernel.org/
- apk - sparse - 0.6.4-r2: normalized package name match | Alpine Linux edge package indexes: sparse from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A semantic parser of source files | http://sparse.wiki.kernel.org/
- apk - sparse-doc - 0.6.4-r2: normalized package name match | Alpine Linux edge package indexes: sparse-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | A semantic parser of source files (documentation) | http://sparse.wiki.kernel.org/
- dnf - sparse - 0.6.4-4.gce1a6720f69e.fc45.8: normalized package name match | Fedora Rawhide package metadata: sparse from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A semantic parser of source files | https://sparse.wiki.kernel.org
- pacman - sparse - 0.6.5+rc1-2: normalized package name match | Arch Linux sync databases: sparse from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Semantic parser for C | https://sparse.docs.kernel.org/en/latest/
- zypper - sparse - 0.6.5~rc1+20251218-1.2: normalized package name match | openSUSE Tumbleweed package metadata: sparse from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | A semantic parser of source files | https://sparse.docs.kernel.org/
- zypper - sparse-inspect - 0.6.5~rc1+20251218-1.2: normalized package name match | openSUSE Tumbleweed package metadata: sparse-inspect from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Inspect binary from sparse | https://sparse.docs.kernel.org/


## Combined YAML source

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