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

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

## 安装

```sh
sudo av install brew:apr
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install apr
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install apr
```

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

### Linux

- apk (92%):

```sh
sudo apk add apr
```

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

- dnf (92%):

```sh
sudo dnf install apr
```

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

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

- pacman (92%):

```sh
sudo pacman -S apr
```

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

- Debian apt (92%):

```sh
sudo apt install libapr1-dev
```

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

- zypper (92%):

```sh
sudo zypper install apr-devel
```

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

## 软件包事实

- **软件包键:** brew:apr
- **软件包管理器:** Homebrew
- **版本:** 1.7.6
- **来源摘要:** Apache Portable Runtime library
- **主页:** <https://apr.apache.org/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- apr-1-config (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

Apache Portable Runtime is a C portability library that gives Apache-family software a consistent API over platform-specific operating-system services. It abstracts files, sockets, processes, threads, memory pools, locking, and related native facilities.

### 项目历史

APR originated in the Apache HTTP Server world and became its own Apache project around a general portability mission: provide predictable behavior across operating systems so application code does not need piles of platform-specific branches.

The project retained a classic Apache development shape: source in Apache Subversion, stable API manuals by branch, release tarballs, mailing-list development, and a small set of companion subprojects such as APR-util and APR-iconv.

The current stable documentation line is APR 1.7. Apache's project page lists APR 1.7.6 as the recommended release in 2025 and describes 1.7 as an enhancement and bugfix line documented through the project's CHANGES files.

### 采用历史

APR first mattered because Apache HTTP Server needed portable native infrastructure across Unix, Windows, and other supported systems. Apache later advertised projects using APR outside HTTP Server, explicitly encouraging broader reuse after several years of development.

The supplied package metadata shows the result of that portability role: APR is packaged across Homebrew, Debian/Ubuntu, Fedora/dnf, Alpine/apk, Arch/pacman, MacPorts, Nix, and openSUSE/zypper. That spread is typical for a foundational C library rather than an end-user CLI.

APR's apr-1-config executable is part of its adoption story. It gives source builds a stable way to ask an installed APR for include paths, compiler flags, and linker flags, which is why it appears in so many package recipes.

### 使用方式

Developers use APR by compiling against its headers and library, often discovered through apr-1-config. Runtime users usually encounter it as an indirect dependency of Apache HTTP Server, Subversion-era tooling, or Apache modules.

APR's memory pool model and portability wrappers are particularly recognizable to C programmers maintaining long-lived server software. They make it possible to write one native code path that still behaves sensibly on Unix and Windows.

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

APR is one of those quiet packages that makes old-school portable C infrastructure work. It carries ABI concerns, platform feature detection, and build-helper behavior that package maintainers need to get exactly right or large chunks of Apache-linked software fail to compile.

It also marks a packaging boundary: APR is the low-level portability substrate, APR-util adds optional higher-level integrations, and consumers can depend on one or both depending on how much Apache runtime surface they need.

### 时间线

- 1990s-2000s: APR emerges from Apache HTTP Server portability work.
- 2008: APR project website documents APR, APR-util, and APR-iconv as supported subprojects.
- 2025: APR 1.7.6 listed by Apache as the recommended APR release.

### Related projects

- Apache HTTP Server was the original ecosystem driver for APR.
- APR-util is the companion utility library above core APR.
- APR-iconv is the related portable iconv implementation under the APR project.

### 来源

- <https://apr.apache.org/>
- <https://apr.apache.org/docs/apr/1.7>
- source_facts.package-manager


## 安全说明

library-like package without higher-risk signals.

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

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

- Debian apt - libapr1-dev - 1.7.5-1: normalized package name match | Debian stable package indexes: libapr1-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Apache Portable Runtime Library - Development Headers | https://apr.apache.org/
- Debian apt - libapr1t64 - 1.7.5-1: normalized package name match | Debian stable package indexes: libapr1t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Apache Portable Runtime Library | https://apr.apache.org/
- Nix - apr: normalized package name match | nixpkgs package indexes: pkgs/by-name/ap/apr/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libapr1-dev - 1.7.2-3.1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libapr1-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Apache Portable Runtime Library - Development Headers | https://apr.apache.org/
- Ubuntu apt - libapr1t64 - 1.7.2-3.1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libapr1t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Apache Portable Runtime Library | https://apr.apache.org/
- apk - apr - 1.7.6-r0: normalized package name match | Alpine Linux edge package indexes: apr from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The Apache Portable Runtime | https://apr.apache.org/
- apk - apr-dev - 1.7.6-r0: normalized package name match | Alpine Linux edge package indexes: apr-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | The Apache Portable Runtime | https://apr.apache.org/
- dnf - apr - 1.7.6-6.fc45: normalized package name match | Fedora Rawhide package metadata: apr from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Apache Portable Runtime library | https://apr.apache.org/
- dnf - apr-devel - 1.7.6-6.fc45: normalized package name match | Fedora Rawhide package metadata: apr-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | APR library development kit | https://apr.apache.org/
- pacman - apr - 1.7.6-1: normalized package name match | Arch Linux sync databases: apr from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | The Apache Portable Runtime | https://apr.apache.org/
- zypper - apr-devel - 1.7.6-2.2: normalized package name match | openSUSE Tumbleweed package metadata: apr-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Development files for the Apache Portable Runtime (APR) library | https://apr.apache.org/
- zypper - libapr1-0 - 1.7.6-2.2: normalized package name match | openSUSE Tumbleweed package metadata: libapr1-0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Apache Portable Runtime (APR) Library | https://apr.apache.org/
- MacPorts - apr: normalized package name match | MacPorts ports tree: devel/apr/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/apr.yml](https://github.com/mxcl/pkgdb/blob/main/combined/apr.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
