# 使用 Homebrew, apk, apt, dnf, Nix 安装 bgpq4

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

## 安装

```sh
sudo av install brew:bgpq4
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install bgpq4
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add bgpq4
```

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

- Debian apt (92%):

```sh
sudo apt install bgpq4
```

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

- dnf (92%):

```sh
sudo dnf install bgpq4
```

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

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

## 软件包事实

- **软件包键:** brew:bgpq4
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/bgpq4>
- **版本:** 1.16
- **来源摘要:** BGP filtering automation for Cisco, Juniper, BIRD and OpenBGPD routers
- **主页:** <https://github.com/bgp/bgpq4>
- **仓库:** <https://github.com/bgp/bgpq4>
- **许可证:** BSD-2-Clause
- **源码归档:** <https://github.com/bgp/bgpq4/archive/refs/tags/1.16.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- bgpq4 (cli)
- bgpq4 (别名)

## 构建依赖

- autoconf
- automake
- libtool

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.16
- 本地数据: OK
- 上游仓库: https://github.com/bgp/bgpq4
- 检测到的最新版本: 1.16 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

bgpq4 is the modern bgpq-family CLI for generating router filters from IRR data. It keeps the operator-friendly model of bgpq3 while focusing on newer IRRd behavior, newer vendor outputs, and ongoing maintenance.

### 项目历史

The bgpq4 changelog explicitly records version 0.0.1 in 2019 as the point where bgpq3 was forked into bgpq4. The repository preserves older bgpq3 history back to the 2007 rewrite, but the bgpq4 line is documented as the post-2019 fork.

Early bgpq4 releases removed legacy options, improved performance by using IRRd 4's A query when available, and added Mikrotik support. Later releases reorganized the source tree, adopted OpenBSD-style formatting, reduced memory use with a red-black tree for ASN storage, and added outputs such as Junos as-path-origin, Nokia SR Linux, Mikrotik RouterOS v6/v7, Arista EOS, Huawei XPL, and other router-policy formats.

### 采用历史

The input metadata lists bgpq4 packages across Alpine, Homebrew, Debian, Fedora/DNF, Nix, and Ubuntu, and the upstream README includes a packaging-status badge. That breadth matters because bgpq4 is the sort of tool network engineers want available on jump hosts, CI runners, and laptops without hand-building it.

### 使用方式

The README describes bgpq4 as producing prefix lists, extended access lists, policy-statement terms, and AS-path lists from IRR objects. Operators pass ASNs, AS sets, route sets, or prefixes, select sources such as RPKI, AFRINIC, ARIN, APNIC, LACNIC, and RIPE, and choose target syntax for Cisco, Juniper, BIRD, OpenBGPD, Nokia, Mikrotik, Huawei, Arista, or JSON output.

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

bgpq4 is a package-nerd favorite because it condenses a brittle BGP edge-operations task into a single auditable binary. It is small C code, has no daemon to operate, emits plain text suitable for config generation pipelines, and exists precisely where package managers shine: getting a boring but critical network-ops tool onto many Unix-like systems.

### 时间线

- 2007: The inherited bgpq-family Git history begins with the bgpq3 rewrite.
- 2019: bgpq3 is forked into bgpq4; early releases remove legacy flags and use IRRd 4's A query when available.
- 2021: Version 1.3 reorganizes the repository, reformats large parts of the code, and reduces memory use.
- 2022: Version 1.5 adds Junos as-path-origin support.
- 2023: Versions 1.10 and 1.11 add Nokia SR Linux support and tighten AS23456 handling.
- 2026: Version 1.16 is released.

### Related projects

- bgpq3 is the direct predecessor. The tool also lives beside IRRd, RADB-style IRR services, RPKI-aware workflows, and router stacks such as Cisco IOS/IOS XR, JunOS, BIRD, OpenBGPD, Nokia SR OS/SR Linux, Mikrotik RouterOS, Huawei, and Arista EOS.

### 来源

- <https://api.github.com/repos/bgp/bgpq4>
- <https://github.com/bgp/bgpq4#readme>
- <https://raw.githubusercontent.com/bgp/bgpq4/main/CHANGES>
- input.source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** bgpq4
- **Version Scheme:** 0
- **Revision:** 0
- **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 - bgpq4 - 1.12-1: normalized package name match | Debian stable package indexes: bgpq4 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | automatic BGP filter generator using IRR routing data | https://github.com/bgp/bgpq4
- Nix - bgpq4: normalized package name match | nixpkgs package indexes: pkgs/by-name/bg/bgpq4/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - bgpq4 - 1.12-1: normalized package name match | Ubuntu 24.04 LTS package indexes: bgpq4 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | automatic BGP filter generator using IRR routing data | https://github.com/bgp/bgpq4
- apk - bgpq4 - 1.16-r0: normalized package name match | Alpine Linux edge package indexes: bgpq4 from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | bgp filtering automation tool | https://github.com/bgp/bgpq4
- apk - bgpq4-doc - 1.16-r0: normalized package name match | Alpine Linux edge package indexes: bgpq4-doc from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | bgp filtering automation tool (documentation) | https://github.com/bgp/bgpq4
- dnf - bgpq4 - 1.16-2.fc45: normalized package name match | Fedora Rawhide package metadata: bgpq4 from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Automate BGP filter generation based on routing database information | https://github.com/bgp/bgpq4


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Productivity CLI packages](https://pkg.so/zh-hans/productivity-cli-packages/) - Matched curated productivity category metadata from av.db.
- [libtool](https://pkg.so/zh-hans/brew/libtool/) - Build dependency declared by Homebrew.
- [autoconf](https://pkg.so/zh-hans/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://pkg.so/zh-hans/brew/automake/) - Build dependency declared by Homebrew.
- [bgpq3](https://pkg.so/zh-hans/brew/bgpq3/) - Package name indicates the same formula family.
- [osrm-backend](https://pkg.so/zh-hans/brew/osrm-backend/) - Shares pkgdb curated category or tags: cli, networking, routing.
- [asroute](https://pkg.so/zh-hans/brew/asroute/) - Shares pkgdb curated category or tags: cli, networking, routing.
- [babeld](https://pkg.so/zh-hans/brew/babeld/) - Shares pkgdb curated category or tags: cli, networking, routing.
- [olsrd](https://pkg.so/zh-hans/brew/olsrd/) - Shares pkgdb curated category or tags: cli, networking, routing.
- [monocle](https://pkg.so/zh-hans/brew/monocle/) - Shares pkgdb curated category or tags: bgp, cli, networking, routing.
- [bgpstream](https://pkg.so/zh-hans/brew/bgpstream/) - Shares pkgdb curated category or tags: bgp, cli, networking, routing.
- [bgpdump](https://pkg.so/zh-hans/brew/bgpdump/) - Shares pkgdb curated category or tags: bgp, cli, networking, routing.

## Combined YAML source

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


## 来源

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