# 使用 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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
- **版本:** 1.16
- **来源摘要:** BGP filtering automation for Cisco, Juniper, BIRD and OpenBGPD routers
- **主页:** <https://github.com/bgp/bgpq4>
- **仓库:** <https://github.com/bgp/bgpq4>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- bgpq4 (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.16
## 项目历史与用法

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

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

- 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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Automate BGP filter generation based on routing database information | https://github.com/bgp/bgpq4


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