# 使用 Homebrew, winget, apk, apt, dnf, Nix, scoop, zypper 安装 gnu-units

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

## 安装

```sh
sudo av install brew:gnu-units
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gnu-units
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add units
```

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

- Debian apt (92%):

```sh
sudo apt install units
```

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

- dnf (92%):

```sh
sudo dnf install units
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#units
```

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

- zypper (92%):

```sh
sudo zypper install units
```

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

### Windows

- winget (92%):

```sh
winget install --id GNU.Units -e
```

  证据: Windows Package Manager source index: GNU.Units from https://cdn.winget.microsoft.com/cache/source.msix

- Scoop (92%):

```sh
scoop install main/units
```

  证据: Scoop official bucket manifest trees: bucket/units.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:gnu-units
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/gnu-units>
- **版本:** 2.27
- **来源摘要:** GNU unit conversion tool
- **主页:** <https://www.gnu.org/software/units/>
- **上游文档:** <https://www.gnu.org/software/units/manual/units.html>
- **许可证:** GPL-3.0-or-later
- **源码归档:** <https://ftpmirror.gnu.org/gnu/units/units-2.27.tar.gz>
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- units (cli)
- units (别名)

## 依赖

- readline

## 安装行为

- post-install 钩子: 未定义
- 注意事项: All commands have been installed with the prefix "g". If you need to use these commands with their normal names, you can add a "gnubin" directory to your PATH from your bashrc like: PATH="$HOMEBREW_PREFIX/opt/gnu-units/libexec/gnubin:$PATH"
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

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

GNU Units is a command-line unit conversion program and scientific calculator. It converts between measurement systems, checks dimensional consistency, supports nonlinear conversions, and reads its knowledge from data files that users can extend.

### 项目历史

The GNU FTP archive records Units releases from the 1.x line in 1997 through the 2.x line, while the manual describes edition 2.25 and the program model used by the modern package. Its evolution turned a unit converter into a calculator that understands products, quotients, powers, roots, temperature conversions, unit lists, physical constants, currency data, CPI data, Unicode, readline, and custom definitions.

The project keeps unit definitions outside the executable. The GNU page and manual both stress that users can rely on the bundled data files or provide supplemental definitions, making the package partly a maintained measurement database and partly an interactive calculator.

### 采用历史

GNU Units is broadly useful in engineering, science, cooking, astronomy, packaging, and everyday shell work because it gives unit-aware answers without opening a large computer algebra system. Its availability across Unix package managers and a Windows binary reflects that utility: the program is small, scriptable, and backed by a large curated unit database.

### 使用方式

Practitioners use units interactively at the You have and You want prompts, or non-interactively by passing source and destination expressions on the command line. They also use it to reduce a unit to its definition, search the database, verify conformability, calculate with constants, and add local definitions for domain-specific units.

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

Package nerds care about GNU Units because it turns messy measurement lore into a reproducible data file shipped by the operating system. It is one of those quiet command-line tools that prevents dimensional mistakes in scripts, documentation, package formulas, lab notebooks, and build-time calculations.

### 时间线

- 1997: GNU FTP archive lists units 1.53.
- 2012: GNU FTP archive lists units 2.00.
- 2024: GNU FTP archive lists units 2.23 and 2.24.
- 2026: GNU FTP archive lists units 2.27.

### Related projects

- Related tools include bc, dc, physical-constants tables, currency data updaters, readline-enabled command interpreters, and unit support in scientific programming environments.

### 来源

- <https://ftp.gnu.org/gnu/units/>
- <https://www.gnu.org/software/units/>
- <https://www.gnu.org/software/units/manual/units.html>


## 安全说明

narrow executable package without higher-risk signals.

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** gnu-units
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- winget - GNU.Units: normalized package name match | Windows Package Manager source index: GNU.Units from https://cdn.winget.microsoft.com/cache/source.msix
- Debian apt - units - 2.24-1+deb13u1: installed executable or alias match | Debian stable package indexes: units from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | converts between different systems of units | https://www.gnu.org/software/units/
- Nix - units: installed executable or alias match | nixpkgs package indexes: pkgs/by-name/un/units/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - units - 2.23-1build2: installed executable or alias match | Ubuntu 24.04 LTS package indexes: units from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | converts between different systems of units | https://www.gnu.org/software/units/
- apk - units - 2.23-r0: installed executable or alias match | Alpine Linux edge package indexes: units from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Units conversion and calculation program | https://www.gnu.org/software/units/
- apk - units-cur-update - 2.23-r0: installed executable or alias match | Alpine Linux edge package indexes: units-cur-update from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Units conversion and calculation program (currency database updater) | https://www.gnu.org/software/units/
- apk - units-doc - 2.23-r0: installed executable or alias match | Alpine Linux edge package indexes: units-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Units conversion and calculation program (documentation) | https://www.gnu.org/software/units/
- dnf - units - 2.27-2.fc45: installed executable or alias match | Fedora Rawhide package metadata: units from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | A utility for converting amounts from one unit to another | https://www.gnu.org/software/units/units.html
- zypper - units - 2.27-1.2: installed executable or alias match | openSUSE Tumbleweed package metadata: units from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Conversion Utility | https://www.gnu.org/software/units/
- Scoop - main/units: installed executable or alias match | Scoop official bucket manifest trees: bucket/units.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## 相关链接

- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Scientific computing packages](https://www.automicvault.com/zh-hans/pkg/scientific-computing-tools/) - Matched scientific computing metadata.
- [Homebrew utility packages](https://www.automicvault.com/zh-hans/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [rink](https://www.automicvault.com/zh-hans/pkg/brew/rink/) - Shares av.db curated category or tags: calculator, cli, science, unit-conversion.
- [calc](https://www.automicvault.com/zh-hans/pkg/brew/calc/) - Shares av.db curated category or tags: calculator, cli, science.
- [glpk](https://www.automicvault.com/zh-hans/pkg/brew/glpk/) - Shares av.db curated category or tags: cli, gnu, science.
- [gnuastro](https://www.automicvault.com/zh-hans/pkg/brew/gnuastro/) - Shares av.db curated category or tags: cli, gnu, science.
- [libqalculate](https://www.automicvault.com/zh-hans/pkg/brew/libqalculate/) - Shares av.db curated category or tags: calculator, cli, science.
- [numbat](https://www.automicvault.com/zh-hans/pkg/brew/numbat/) - Shares av.db curated category or tags: calculator, cli, science.
- [spigot](https://www.automicvault.com/zh-hans/pkg/brew/spigot/) - Shares av.db curated category or tags: calculator, cli, science.
- [udunits](https://www.automicvault.com/zh-hans/pkg/brew/udunits/) - Shares av.db curated category or tags: cli, science, unit-conversion.

## Combined YAML source

View the package source record on GitHub. [combined/gnu-units.yml](https://github.com/automic-vault/db/blob/main/combined/gnu-units.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
