# Install pcre with Homebrew, apk, MacPorts, Nix, pacman, apt, scoop

Perl compatible regular expressions library. Version 8.45 via Homebrew; verified 2026-07-11. Also installable with nix: nix profile install nixpkgs#pcre.

## Install

```sh
sudo av install brew:pcre
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install pcre
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install pcre
```

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

### Linux

- apk (92%):

```sh
sudo apk add pcre
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#pcre
```

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

- pacman (92%):

```sh
sudo pacman -S pcre
```

  Evidence: Arch Linux sync databases: pcre from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz

- Ubuntu apt (92%):

```sh
sudo apt install pcregrep
```

  Evidence: Ubuntu 24.04 LTS package indexes: pcregrep from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz

### Windows

- Scoop (92%):

```sh
scoop install main/pcregrep
```

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

## Package facts

- **Package key:** brew:pcre
- **Package manager:** Homebrew
- **Version:** 8.45
- **Source summary:** Perl compatible regular expressions library
- **Homepage:** <https://www.pcre.org/>
- **Last updated:** 2026-07-11T15:23:35+09:00
- **Generated:** 2026-08-03T19:37:03+00:00

## Executables

- pcre-config (alias)
- pcregrep (alias)
- pcretest (alias)

## Install behavior

- Bottle: not available

## Freshness

- Page generated: 2026-08-03
- Package-manager version: 8.45

## Security Notes

library-like package without higher-risk signals.

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

## Other Package-Manager Records

- Nix - pcre: normalized package name match | nixpkgs package indexes: pkgs/by-name/pc/pcre/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - libpcre16 - 8.45-r4: normalized package name match | Alpine Linux edge package indexes: libpcre16 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | PCRE with 16 bit character support | https://www.pcre.org/
- apk - libpcre32 - 8.45-r4: normalized package name match | Alpine Linux edge package indexes: libpcre32 from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | PCRE with 32 bit character support | https://www.pcre.org/
- apk - libpcrecpp - 8.45-r4: normalized package name match | Alpine Linux edge package indexes: libpcrecpp from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | C++ bindings for PCRE | https://www.pcre.org/
- apk - pcre - 8.45-r4: normalized package name match | Alpine Linux edge package indexes: pcre from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Perl-compatible regular expression library | https://www.pcre.org/
- apk - pcre-dev - 8.45-r4: normalized package name match | Alpine Linux edge package indexes: pcre-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Perl-compatible regular expression library (development files) | https://www.pcre.org/
- apk - pcre-doc - 8.45-r4: normalized package name match | Alpine Linux edge package indexes: pcre-doc from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Perl-compatible regular expression library (documentation) | https://www.pcre.org/
- apk - pcre-static - 8.45-r4: normalized package name match | Alpine Linux edge package indexes: pcre-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Perl-compatible regular expression library (static library) | https://www.pcre.org/
- apk - pcre-tools - 8.45-r4: normalized package name match | Alpine Linux edge package indexes: pcre-tools from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Auxiliary utilities for PCRE | https://www.pcre.org/
- pacman - pcre - 8.45-4: normalized package name match | Arch Linux sync databases: pcre from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | A deprecated library that implements Perl 5-style regular expressions | https://www.pcre.org/
- MacPorts - pcre: normalized package name match | MacPorts ports tree: devel/pcre/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Ubuntu apt - pcregrep - 2:8.39-15build1: installed executable or alias match | Ubuntu 24.04 LTS package indexes: pcregrep from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | grep utility that uses perl 5 compatible regexes.
- Scoop - main/pcregrep: installed executable or alias match | Scoop official bucket manifest trees: bucket/pcregrep.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1


## Combined YAML source

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


## Sources

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