# 使用 Homebrew, apk, dnf, MacPorts, Nix, pacman, apt, zypper 安装 libgpg-error

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

## 安装

```sh
sudo av install brew:libgpg-error
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libgpg-error
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libgpg-error
```

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

### Linux

- apk (92%):

```sh
sudo apk add libgpg-error
```

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

- dnf (92%):

```sh
sudo dnf install libgpg-error
```

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

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

- pacman (92%):

```sh
sudo pacman -S libgpg-error
```

  证据: Arch Linux sync databases: libgpg-error from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz

- Debian apt (92%):

```sh
sudo apt install gpgrt-tools
```

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

- zypper (92%):

```sh
sudo zypper install libgpg-error-devel
```

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

## 软件包事实

- **软件包键:** brew:libgpg-error
- **软件包管理器:** Homebrew
- **版本:** 1.61
- **来源摘要:** Common error values for all GnuPG components
- **主页:** <https://www.gnupg.org/related_software/libgpg-error/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gpg-error (别名)
- gpg-error-config (别名)
- gpgrt-config (别名)
- yat2m (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Libgpg-error is the small but central GnuPG runtime library that gives GnuPG components a common vocabulary for error codes and error handling. Over time it also accumulated reusable runtime pieces such as streams, printf-style functions, locks, Base64 helpers, logging, option parsing, and Windows portability support.

### 项目历史

The GnuPG project describes Libgpg-error as a library that originally defined common error values for GPG, GPGSM, GPGME, GPG-Agent, libgcrypt, Libksba, DirMngr, Pinentry, SCdaemon, and related components. The project page also notes the long-term plan to rename the library to Libgpgrt, reflecting its broader role as the GnuPG runtime.

The public repository history dates back to 2003 in the GitHub mirror, and the official tarball directory records a long sequence of 1.x releases. By the 2020s, release notes document new gpgrt-prefixed process APIs, name-value helpers, Windows registry helpers, cross-compilation work, and platform fixes.

### 采用历史

Libgpg-error is adopted mostly by being pulled in as a dependency of the GnuPG stack. A system that builds libgcrypt, GPGME, pinentry, or GnuPG itself generally needs the common error/runtime layer first.

Package managers expose it as both a library and a small tool package; the Homebrew batch input lists gpg-error, gpg-error-config, gpgrt-config, and yat2m executables. Debian and Ubuntu package the tools under gpgrt-tools, which reflects the project's gradual Libgpgrt naming direction.

### 使用方式

Developers use Libgpg-error directly when writing code in the GnuPG ecosystem or when they need the library's gpgrt runtime services. Most users encounter it indirectly through cryptographic packages that rely on GnuPG libraries.

At build time, gpgrt-config and gpg-error-config help downstream software discover headers, compiler flags, and linker flags, making the package part of the familiar Unix library toolchain.

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

This is the kind of tiny library that explains why cryptographic packages have deep dependency chains. It appears boring, but if it is missing or mismatched, libgcrypt, GPGME, and larger GnuPG builds fail early.

The rename pressure toward gpgrt is package-nerd notable: package names, tool names, headers, and downstream dependencies do not all switch at once, so distributions carry both the historical libgpg-error identity and newer gpgrt-facing interfaces.

### 时间线

- 2003-06-05: The GitHub mirror includes repository history from this date.
- 2020-11-19: The GnuPG project page source was last changed, describing the gpgrt.h direction.
- 2024-06-19: Version 1.50 added a new set of process spawn functions.
- 2025-04-08: Version 1.52 added name-value file APIs, string-list APIs, and Windows registry helpers.
- 2026-05-07: Version 1.61 fixed es_printf and vfnameconcat security-related bugs and added Emscripten cross-compile support.

### Related projects

- GnuPG, libgcrypt, GPGME, Libksba, Pinentry, DirMngr, and SCdaemon are direct members of the ecosystem that use the shared error/runtime layer.
- Libgpgrt is the intended runtime-library identity reflected by gpgrt-prefixed functions, gpgrt.h, and gpgrt-config.
- Homebrew, Debian, Ubuntu, Fedora, Arch, and other package managers distribute it as a foundational GnuPG dependency.

### 来源

- <https://github.com/gpg/libgpg-error>
- <https://github.com/gpg/libgpg-error/blob/master/NEWS>
- <https://github.com/gpg/libgpg-error/blob/master/README>
- <https://gnupg.org/ftp/gcrypt/libgpg-error/>
- <https://www.gnupg.org/software/libgpg-error/index.html>


## 安全说明

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


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

- Debian apt - gpgrt-tools - 1.51-4: normalized package name match | Debian stable package indexes: gpgrt-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GnuPG development runtime library (executable tools) | https://www.gnupg.org/related_software/libgpg-error/
- Debian apt - libgpg-error-dev - 1.51-4: normalized package name match | Debian stable package indexes: libgpg-error-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GnuPG development runtime library (developer tools) | https://www.gnupg.org/related_software/libgpg-error/
- Debian apt - libgpg-error-l10n - 1.51-4: normalized package name match | Debian stable package indexes: libgpg-error-l10n from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library of error values and messages in GnuPG (localization files) | https://www.gnupg.org/related_software/libgpg-error/
- Debian apt - libgpg-error-mingw-w64-dev - 1.51-4: normalized package name match | Debian stable package indexes: libgpg-error-mingw-w64-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library of error values and messages in GnuPG (Windows development) | https://www.gnupg.org/related_software/libgpg-error/
- Debian apt - libgpg-error0 - 1.51-4: normalized package name match | Debian stable package indexes: libgpg-error0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GnuPG development runtime library | https://www.gnupg.org/related_software/libgpg-error/
- Nix - libgpg-error: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libgpg-error/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gpgrt-tools - 1.47-3build2: normalized package name match | Ubuntu 24.04 LTS package indexes: gpgrt-tools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GnuPG development runtime library (executable tools) | https://www.gnupg.org/related_software/libgpg-error/
- Ubuntu apt - libgpg-error-dev - 1.47-3build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libgpg-error-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GnuPG development runtime library (developer tools) | https://www.gnupg.org/related_software/libgpg-error/
- Ubuntu apt - libgpg-error-l10n - 1.47-3build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libgpg-error-l10n from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | library of error values and messages in GnuPG (localization files) | https://www.gnupg.org/related_software/libgpg-error/
- Ubuntu apt - libgpg-error-mingw-w64-dev - 1.47-3build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libgpg-error-mingw-w64-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | library of error values and messages in GnuPG (Windows development) | https://www.gnupg.org/related_software/libgpg-error/
- Ubuntu apt - libgpg-error0 - 1.47-3build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libgpg-error0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GnuPG development runtime library | https://www.gnupg.org/related_software/libgpg-error/
- apk - libgpg-error - 1.61-r0: normalized package name match | Alpine Linux edge package indexes: libgpg-error from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Support library for libgcrypt | https://www.gnupg.org/
- apk - libgpg-error-dev - 1.61-r0: normalized package name match | Alpine Linux edge package indexes: libgpg-error-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Support library for libgcrypt (development files) | https://www.gnupg.org/
- apk - libgpg-error-doc - 1.61-r0: normalized package name match | Alpine Linux edge package indexes: libgpg-error-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Support library for libgcrypt (documentation) | https://www.gnupg.org/
- apk - libgpg-error-lisp - 1.61-r0: normalized package name match | Alpine Linux edge package indexes: libgpg-error-lisp from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Support library for libgcrypt | https://www.gnupg.org/
- apk - libgpg-error-static - 1.61-r0: normalized package name match | Alpine Linux edge package indexes: libgpg-error-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | libgpg-error static libraries | https://www.gnupg.org/


## Combined YAML source

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


## 来源

- pkg.so package database
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
