# 安装 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/13ee7b80cb813542594d4235c4a0b8695435d5ecf23dd3580bc7515ae1b6180d-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#pcre2
```

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

- 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

### 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-03-20T18:55:39Z
- **生成来源:** 2026-05-26T17:25:59+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-05-26
- 管理器版本: 10.47
- 管理器更新时间: 2026-03-20
- 本地数据: ok
- 上游仓库: https://github.com/PCRE2Project/pcre2
- info: No cached GitHub release or tag data was available.

## 安全说明

library-like package without higher-risk signals.

- **Geiger 风险:** green / low
- library-like package without higher-risk signals

## 相关链接

- [glib](https://www.automicvault.com/pkg/brew/glib/) - Popular package that depends on this formula.
- [git](https://www.automicvault.com/pkg/brew/git/) - Popular package that depends on this formula.
- [ripgrep](https://www.automicvault.com/pkg/brew/ripgrep/) - Popular package that depends on this formula.
- [php](https://www.automicvault.com/pkg/brew/php/) - Popular package that depends on this formula.
- [watchman](https://www.automicvault.com/pkg/brew/watchman/) - Popular package that depends on this formula.
- [nmap](https://www.automicvault.com/pkg/brew/nmap/) - Popular package that depends on this formula.
- [fish](https://www.automicvault.com/pkg/brew/fish/) - Popular package that depends on this formula.
- [zsh](https://www.automicvault.com/pkg/brew/zsh/) - Popular package that depends on this formula.
- [pcre](https://www.automicvault.com/pkg/brew/pcre/) - Package name indicates the same formula family.

## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- package version freshness
- package relationship graph
- cross-ecosystem install command graph
