# 使用 Homebrew, apk, dnf, Nix, pacman, apt, zypper, scoop 安装 pcre2

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

## 安装

```sh
sudo av install brew:pcre2
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install pcre2
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add pcre2
```

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

- dnf (92%):

```sh
sudo dnf install pcre2
```

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

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

- pacman (92%):

```sh
sudo pacman -S pcre2
```

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

- Debian apt (92%):

```sh
sudo apt install libpcre2-16-0
```

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

- zypper (92%):

```sh
sudo zypper install libpcre2-16-0
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/pcre2grep
```

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

## 软件包事实

- **软件包键:** brew:pcre2
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/pcre2>
- **版本:** 10.47
- **来源摘要:** Perl compatible regular expressions library with a new API
- **主页:** <https://www.pcre.org/>
- **仓库:** <https://github.com/PCRE2Project/pcre2>
- **上游文档:** <https://www.pcre.org/>
- **许可证:** BSD-3-Clause
- **源码归档:** <https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.47/pcre2-10.47.tar.bz2>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- pcre2-config (cli)
- pcre2grep (cli)
- pcre2test (cli)
- pcre2-config (别名)
- pcre2grep (别名)
- pcre2test (别名)

## macOS 提供的库

- bzip2

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sequoia, sonoma, tahoe, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 10.47
- 本地数据: OK
- 上游仓库: https://github.com/PCRE2Project/pcre2
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.

## 安全说明

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:** pcre2
- **Version Scheme:** 0
- **Revision:** 1
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

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

- Debian apt - libpcre2-16-0 - 10.46-1~deb13u1: normalized package name match | Debian stable package indexes: libpcre2-16-0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | New Perl Compatible Regular Expression Library - 16 bit runtime files | https://github.com/PCRE2Project/pcre2
- Debian apt - libpcre2-32-0 - 10.46-1~deb13u1: normalized package name match | Debian stable package indexes: libpcre2-32-0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | New Perl Compatible Regular Expression Library - 32 bit runtime files | https://github.com/PCRE2Project/pcre2
- Debian apt - libpcre2-8-0 - 10.46-1~deb13u1: normalized package name match | Debian stable package indexes: libpcre2-8-0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | New Perl Compatible Regular Expression Library- 8 bit runtime files | https://github.com/PCRE2Project/pcre2
- Debian apt - libpcre2-dev - 10.46-1~deb13u1: normalized package name match | Debian stable package indexes: libpcre2-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | New Perl Compatible Regular Expression Library - development files | https://github.com/PCRE2Project/pcre2
- Debian apt - libpcre2-posix3 - 10.46-1~deb13u1: normalized package name match | Debian stable package indexes: libpcre2-posix3 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | New Perl Compatible Regular Expression Library - posix-compatible runtime files | https://github.com/PCRE2Project/pcre2
- Debian apt - pcre2-utils - 10.46-1~deb13u1: normalized package name match | Debian stable package indexes: pcre2-utils from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | New Perl Compatible Regular Expression Library - utilities | https://github.com/PCRE2Project/pcre2
- Nix - pcre2: normalized package name match | nixpkgs package indexes: pkgs/by-name/pc/pcre2/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libpcre2-16-0 - 10.42-4ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libpcre2-16-0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | New Perl Compatible Regular Expression Library - 16 bit runtime files | https://pcre.org/
- Ubuntu apt - libpcre2-32-0 - 10.42-4ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libpcre2-32-0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | New Perl Compatible Regular Expression Library - 32 bit runtime files | https://pcre.org/
- Ubuntu apt - libpcre2-8-0 - 10.42-4ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libpcre2-8-0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | New Perl Compatible Regular Expression Library- 8 bit runtime files | https://pcre.org/
- Ubuntu apt - libpcre2-dev - 10.42-4ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libpcre2-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | New Perl Compatible Regular Expression Library - development files | https://pcre.org/
- Ubuntu apt - libpcre2-posix3 - 10.42-4ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libpcre2-posix3 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | New Perl Compatible Regular Expression Library - posix-compatible runtime files | https://pcre.org/
- Ubuntu apt - pcre2-utils - 10.42-4ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: pcre2-utils from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | New Perl Compatible Regular Expression Library - utilities | https://pcre.org/
- apk - libpcre2-16 - 10.47-r1: normalized package name match | Alpine Linux edge package indexes: libpcre2-16 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | PCRE2 with 16 bit character support | https://pcre.org/
- apk - libpcre2-32 - 10.47-r1: normalized package name match | Alpine Linux edge package indexes: libpcre2-32 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | PCRE2 with 32 bit character support | https://pcre.org/
- apk - pcre2 - 10.47-r1: normalized package name match | Alpine Linux edge package indexes: pcre2 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Perl-compatible regular expression library | https://pcre.org/


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [glib](https://pkg.so/zh-hans/brew/glib/) - Popular package that depends on this formula.
- [git](https://pkg.so/zh-hans/brew/git/) - Popular package that depends on this formula.
- [ripgrep](https://pkg.so/zh-hans/brew/ripgrep/) - Popular package that depends on this formula.
- [php](https://pkg.so/zh-hans/brew/php/) - Popular package that depends on this formula.
- [watchman](https://pkg.so/zh-hans/brew/watchman/) - Popular package that depends on this formula.
- [nmap](https://pkg.so/zh-hans/brew/nmap/) - Popular package that depends on this formula.
- [fish](https://pkg.so/zh-hans/brew/fish/) - Popular package that depends on this formula.
- [zsh](https://pkg.so/zh-hans/brew/zsh/) - Popular package that depends on this formula.
- [pcre](https://pkg.so/zh-hans/brew/pcre/) - Package name indicates the same formula family.
- [oniguruma](https://pkg.so/zh-hans/brew/oniguruma/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries, regular-expressions.
- [onigmo](https://pkg.so/zh-hans/brew/onigmo/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries, regular-expressions.
- [ncurses](https://pkg.so/zh-hans/brew/ncurses/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries.
- [expat](https://pkg.so/zh-hans/brew/expat/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries.
- [libevent](https://pkg.so/zh-hans/brew/libevent/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries.
- [libxml2](https://pkg.so/zh-hans/brew/libxml2/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries.
- [libxslt](https://pkg.so/zh-hans/brew/libxslt/) - Shares pkgdb curated category or tags: c-library, cli, developer-tools, libraries.

## Combined YAML source

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


## 来源

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