# 使用 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **版本:** 10.47
- **来源摘要:** Perl compatible regular expressions library with a new API
- **主页:** <https://www.pcre.org/>
- **仓库:** <https://github.com/PCRE2Project/pcre2>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

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

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 10.47

## 安全说明

library-like package without higher-risk signals.

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

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

- 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/


## 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
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
