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

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

## 安装

```sh
sudo av install brew:glibc
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install glibc
```

  证据: local Homebrew formula metadata

### Linux

- dnf (92%):

```sh
sudo dnf install glibc
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#glibc
```

  证据: nixpkgs package indexes: glibc from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S glibc
```

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

- zypper (92%):

```sh
sudo zypper install glibc
```

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

- Debian apt (92%):

```sh
sudo apt install glibc-doc
```

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

## 软件包事实

- **软件包键:** brew:glibc
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/glibc>
- **版本:** 2.39
- **来源摘要:** GNU C Library
- **主页:** <https://www.gnu.org/software/libc/>
- **上游文档:** <https://www.gnu.org/software/libc/>
- **许可证:** GPL-2.0-or-later AND LGPL-2.1-or-later
- **源码归档:** <https://ftpmirror.gnu.org/gnu/glibc/glibc-2.39.tar.gz>
- **最后更新:** 2026-08-04T11:04:15-04:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- gencat (cli)
- getconf (cli)
- getent (cli)
- iconvconfig (cli)
- ld.so (cli)
- ldconfig (cli)
- ldd (cli)
- locale (cli)
- localedef (cli)
- makedb (cli)
- mtrace (cli)
- nscd (cli)
- pcprofiledump (cli)
- pldd (cli)
- sln (cli)
- sotruss (cli)
- sprof (cli)
- tzselect (cli)
- xtrace (cli)
- zdump (cli)
- zic (cli)
- gencat (别名)
- getconf (别名)
- getent (别名)
- iconvconfig (别名)
- ld.so (别名)
- ldconfig (别名)
- ldd (别名)
- locale (别名)
- localedef (别名)
- makedb (别名)
- mtrace (别名)
- nscd (别名)
- pcprofiledump (别名)
- pldd (别名)
- sln (别名)
- sotruss (别名)
- sprof (别名)
- tzselect (别名)
- xtrace (别名)
- zdump (别名)
- zic (别名)

## 依赖

- linux-headers@6.8

## 安装行为

- post-install 钩子: 未定义
- 注意事项: The Homebrew's Glibc has been installed with the following executables: $HOMEBREW_PREFIX/opt/glibc/bin/ldd $HOMEBREW_PREFIX/opt/glibc/bin/ld.so $HOMEBREW_PREFIX/opt/glibc/sbin/ldconfig By default, Homebrew's linker will not search for the system's libraries. If you want Homebrew to do so, run: cp "$HOMEBREW_PREFIX/etc/ld.so.conf.d/99-system-ld.so.conf.example" "$HOMEBREW_PREFIX/etc/ld.so.conf.d/99-system-ld.so.conf" brew postinstall glibc to append the system libraries to Homebrew's ld search paths. This is risky and **highly not recommended**, because it may cause linkage to Homebrew libraries mixed with system libraries.
- Bottle: 可用 于 arm64_linux, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.39
- 管理器更新时间: 2026-08-04
- 本地数据: OK
- 上游仓库: https://www.gnu.org/software/libc/
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

glibc, the GNU C Library, is the C runtime library used by GNU systems and by most systems with the Linux kernel. It supplies ISO C, POSIX, GNU, internationalization, dynamic loading, locale, resolver, threading, math, and system-call wrapper facilities that user-space programs link against.

### 项目历史

The GNU C Library belongs to the GNU project's effort to provide a complete free Unix-like system. GNU FTP archives show glibc 1.09-era tarballs in the mid-1990s and glibc 2.0.1 in 1997, after which the 2.x line became the long-lived ABI base for Linux distributions.

Sourceware's glibc wiki describes the library as the C library for GNU systems and most Linux-kernel systems, with goals of portability, performance, standards conformance, and extensive internationalization. Its interface history is shaped by ISO C, POSIX, BSD, System V, GNU extensions, and compatibility modes selected at application build time.

glibc development is organized around the Sourceware Git repository, Bugzilla, architecture maintainers, libc-alpha review, release management, and a large testsuite. The project has to balance new CPU architectures, compiler behavior, Linux kernel interfaces, POSIX standards, security fixes, and backwards-compatible ABI promises.

### 采用历史

glibc became one of the defining packages of mainstream Linux distributions because nearly every dynamically linked C program depends on the loader and libc ABI. Distribution upgrades, container base images, cross-toolchains, and binary compatibility policies all treat glibc as a core system component rather than an ordinary leaf package.

Its adoption also made it a reference point for alternatives such as musl, uClibc-ng, Bionic, and BSD libcs. Those projects are often evaluated against glibc's breadth, compatibility, locale behavior, dynamic linker features, and Linux ecosystem expectations.

### 使用方式

Practitioners rarely call glibc as a standalone application; they compile and link C, C++, Go cgo, Rust libc-using crates, Python extensions, and many other native programs against its headers and shared libraries. Runtime tools such as `ldd`, `getconf`, `getent`, `locale`, `localedef`, `iconv`, and `ldconfig` expose pieces of that system layer to administrators and packagers.

Toolchain and packaging work often involves matching glibc with GCC or clang, binutils, Linux kernel headers, and distribution policy. Developers use the manual for APIs, feature-test macros, portability notes, locale behavior, memory allocation, dynamic loading, threads, sockets, name service, and process facilities.

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

glibc is one of the packages that defines a Linux system's ABI. A version bump can affect symbol versions, dynamic loader behavior, DNS and NSS behavior, locale archives, threading primitives, container compatibility, and the minimum runtime expected by prebuilt binaries.

For package managers, glibc is therefore both dependency and platform. It must be upgraded with care, tested broadly, and kept compatible with binaries built over many years, while still tracking kernel, compiler, security, and standards changes.

### 时间线

- 1994: GNU FTP archive lists glibc 1.09 crypt add-on material.
- 1997: glibc 2.0.1 archive published.
- 2000s: glibc 2.x became the common C library base for major Linux distributions.
- 2010s: Sourceware Git, Bugzilla, architecture maintainers, and libc-alpha review became the visible development workflow.
- 2020s: Twice-yearly release management and broad CI/testsuite work continued around Linux, GNU, compiler, and CPU-architecture changes.

### Related projects

- glibc is tied to the GNU Compiler Collection, binutils, Linux kernel headers, GNU Hurd, POSIX standards work, Linux man-pages, distribution toolchains, musl, uClibc-ng, Bionic, and BSD C libraries.

### 来源

- <https://ftp.gnu.org/gnu/glibc/>
- <https://sourceware.org/glibc/manual/2.43/html_node/Introduction.html>
- <https://sourceware.org/glibc/wiki/HomePage>
- <https://www.gnu.org/software/libc/>


## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- library-like package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** glibc
- **Aliases:** glibc@2.39
- **Version Scheme:** 0
- **Revision:** 1
- **Requirements:** brewedglibcnotolder, linux, linuxkernel
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** yes
- **URL Keys:** stable

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

- Debian apt - glibc-doc - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: glibc-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: Documentation | https://www.gnu.org/software/libc/libc.html
- Debian apt - glibc-source - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: glibc-source from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: sources | https://www.gnu.org/software/libc/libc.html
- Debian apt - libc-bin - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: libc-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: Binaries | https://www.gnu.org/software/libc/libc.html
- Debian apt - libc-dev-bin - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: libc-dev-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: Development binaries | https://www.gnu.org/software/libc/libc.html
- Debian apt - libc-devtools - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: libc-devtools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: Development tools | https://www.gnu.org/software/libc/libc.html
- Debian apt - libc-l10n - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: libc-l10n from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: localization files | https://www.gnu.org/software/libc/libc.html
- Debian apt - libc6 - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: libc6 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: Shared libraries | https://www.gnu.org/software/libc/libc.html
- Debian apt - libc6-dbg - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: libc6-dbg from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: detached debugging symbols | https://www.gnu.org/software/libc/libc.html
- Debian apt - libc6-dev - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: libc6-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: Development Libraries and Header Files | https://www.gnu.org/software/libc/libc.html
- Debian apt - libc6-dev-i386 - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: libc6-dev-i386 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: 32-bit development libraries for AMD64 | https://www.gnu.org/software/libc/libc.html
- Debian apt - libc6-dev-x32 - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: libc6-dev-x32 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: X32 ABI Development Libraries for AMD64 | https://www.gnu.org/software/libc/libc.html
- Debian apt - libc6-i386 - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: libc6-i386 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: 32-bit shared libraries for AMD64 | https://www.gnu.org/software/libc/libc.html
- Debian apt - libc6-x32 - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: libc6-x32 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: X32 ABI Shared libraries for AMD64 | https://www.gnu.org/software/libc/libc.html
- Debian apt - locales - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: locales from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: National Language (locale) data [support] | https://www.gnu.org/software/libc/libc.html
- Debian apt - locales-all - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: locales-all from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: Precompiled locale data | https://www.gnu.org/software/libc/libc.html
- Debian apt - nscd - 2.41-12+deb13u3: normalized package name match | Debian stable package indexes: nscd from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GNU C Library: Name Service Cache Daemon | https://www.gnu.org/software/libc/libc.html


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://pkg.so/zh-hans/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://pkg.so/zh-hans/brew-utility-packages/) - Matched Homebrew package provider.
- [crun](https://pkg.so/zh-hans/brew/crun/) - Shares pkgdb curated category or tags: c-library, cli, linux, system.
- [coreutils](https://pkg.so/zh-hans/brew/coreutils/) - Shares pkgdb curated category or tags: cli, gnu, system.
- [util-linux](https://pkg.so/zh-hans/brew/util-linux/) - Shares pkgdb curated category or tags: cli, linux, system.
- [bash](https://pkg.so/zh-hans/brew/bash/) - Shares pkgdb curated category or tags: cli, gnu, system.
- [keyutils](https://pkg.so/zh-hans/brew/keyutils/) - Shares pkgdb curated category or tags: cli, linux, system.
- [podman](https://pkg.so/zh-hans/brew/podman/) - Shares pkgdb curated category or tags: cli, linux, system.
- [systemd](https://pkg.so/zh-hans/brew/systemd/) - Shares pkgdb curated category or tags: cli, linux, system.
- [wayland](https://pkg.so/zh-hans/brew/wayland/) - Shares pkgdb curated category or tags: cli, linux, system.
- [bc](https://pkg.so/zh-hans/brew/bc/) - Local package facts share a topical domain. Shared terms: cli, gnu, system.

## Combined YAML source

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


## 来源

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