# 使用 Homebrew, apt, dnf, MacPorts, Nix, zypper 安装 cpuid

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

## 安装

```sh
sudo av install brew:cpuid
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install cpuid
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install cpuid
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install cpuid
```

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

- dnf (92%):

```sh
sudo dnf install cpuid
```

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

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

- zypper (92%):

```sh
sudo zypper install cpuid
```

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

## 软件包事实

- **软件包键:** brew:cpuid
- **软件包管理器:** Homebrew
- **版本:** 2.4.0
- **来源摘要:** CPU feature identification for Go
- **主页:** <https://github.com/klauspost/cpuid>
- **仓库:** <https://github.com/klauspost/cpuid>
- **最后更新:** 2026-07-25T14:20:51-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- cpuid (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

cpuid is a Go package and command-line tool for detecting CPU information and CPU feature flags at runtime without cgo.

### 项目历史

The official GitHub repository was created in 2015. The README describes startup CPU detection cached for fast access during a Go program's lifetime, with support for x86/x64, ARM/ARM64, and RISC-V.

### 采用历史

cpuid fits Go module distribution as a library imported with github.com/klauspost/cpuid/v2, while also offering an installable cpuid binary via go install, GitHub release binaries, and Homebrew for macOS/Linux users.

### 使用方式

Go programs use the shared cpuid.CPU value to inspect brand, cores, cache, frequency, and feature sets, then call Supports, Has, or HasAll to gate optimized code paths. The command-line binary prints CPU details and supports JSON output.

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

For packagers and Go maintainers, cpuid is notable because it combines a Go module API with a packaged diagnostic binary, avoids external C code, and exposes runtime feature detection useful to compression, crypto, and other optimized Go libraries.

### 时间线

- 2015: The klauspost/cpuid repository was created.
- 2024: v2.2.8 and v2.2.9 releases were published.
- 2025: v2.2.10, v2.2.11, and v2.3.0 releases were published.

### Related projects

- pkg.go.dev provides generated API documentation for the github.com/klauspost/cpuid/v2 Go module.

### 来源

- <https://github.com/klauspost/cpuid>
- <https://raw.githubusercontent.com/klauspost/cpuid/master/README.md>
- <https://pkg.go.dev/github.com/klauspost/cpuid/v2>
- <https://api.github.com/repos/klauspost/cpuid>
- <https://github.com/klauspost/cpuid/releases/tag/v2.3.0>


## 安全说明

narrow executable package without higher-risk signals.

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

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

- Debian apt - cpuid - 20250316-1: normalized package name match | Debian stable package indexes: cpuid from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | tool to dump x86 CPUID information about the CPU(s) | https://www.etallen.com/cpuid.html
- Nix - cpuid: normalized package name match | nixpkgs package indexes: pkgs/by-name/cp/cpuid/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - cpuid - 20240330-1ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: cpuid from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | tool to dump x86 CPUID information about the CPU(s) | https://www.etallen.com/cpuid.html
- dnf - cpuid - 20250419-5.fc45: normalized package name match | Fedora Rawhide package metadata: cpuid from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Dumps information about the CPU(s) | http://www.etallen.com/cpuid.html
- zypper - cpuid - 20260503-1.3: normalized package name match | openSUSE Tumbleweed package metadata: cpuid from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | x86 CPU identification tool | http://etallen.com/cpuid.html
- MacPorts - cpuid: normalized package name match | MacPorts ports tree: sysutils/cpuid/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## Combined YAML source

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