# 使用 Homebrew, Nix, pacman 安装 libnl

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

## 安装

```sh
sudo av install brew:libnl
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libnl
```

  证据: local Homebrew formula metadata

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#libnl
```

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

- pacman (92%):

```sh
sudo pacman -S libnl
```

  证据: Arch Linux sync databases: libnl from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz

## 软件包事实

- **软件包键:** brew:libnl
- **软件包管理器:** Homebrew
- **版本:** 3.12.0
- **来源摘要:** Netlink Library Suite
- **主页:** <https://github.com/thom311/libnl>
- **仓库:** <https://github.com/thom311/libnl>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- genl-ctrl-list (别名)
- idiag-socket-details (别名)
- nf-ct-add (别名)
- nf-ct-events (别名)
- nf-ct-list (别名)
- nf-exp-add (别名)
- nf-exp-delete (别名)
- nf-exp-list (别名)
- nf-log (别名)
- nf-monitor (别名)
- nf-queue (别名)
- nl-addr-add (别名)
- nl-addr-delete (别名)
- nl-addr-list (别名)
- nl-class-add (别名)
- nl-class-delete (别名)
- nl-class-list (别名)
- nl-classid-lookup (别名)
- nl-cls-add (别名)
- nl-cls-delete (别名)
- nl-cls-list (别名)
- nl-fib-lookup (别名)
- nl-link-enslave (别名)
- nl-link-ifindex2name (别名)
- nl-link-list (别名)
- nl-link-name2ifindex (别名)
- nl-link-release (别名)
- nl-link-set (别名)
- nl-link-stats (别名)
- nl-list-caches (别名)
- nl-list-sockets (别名)
- nl-monitor (别名)
- nl-neigh-add (别名)
- nl-neigh-delete (别名)
- nl-neigh-list (别名)
- nl-neightbl-list (别名)
- nl-nh-list (别名)
- nl-pktloc-lookup (别名)
- nl-qdisc-add (别名)
- nl-qdisc-delete (别名)
- nl-qdisc-list (别名)
- nl-route-add (别名)
- nl-route-delete (别名)
- nl-route-get (别名)
- nl-route-list (别名)
- nl-rule-list (别名)
- nl-tctree-list (别名)
- nl-util-addr (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

libnl is the Netlink Protocol Library Suite, a set of C libraries for Linux applications that talk to kernel netlink interfaces. Netlink replaced many ioctl-style networking control paths with a message-based IPC mechanism between user space and the kernel.

### 项目历史

The Infradead project page describes libnl as a suite split into smaller libraries: libnl for socket and message fundamentals, libnl-route for NETLINK_ROUTE interfaces, libnl-genl for generic netlink, and libnl-nf for netfilter interfaces. The split is explicitly intended to avoid forcing every application to link one large library.

The project history includes a long-lived 1.1.x branch and a 3.x branch. The Infradead page warns that 1.1.x support is limited and tells new applications to target libnl3, while also documenting distribution package names for CentOS, Debian, Fedora, OpenSUSE, Slackware, and Ubuntu.

### 采用历史

libnl became a standard dependency for Linux networking software that needed structured access to routes, addresses, links, traffic control, generic netlink families, and netfilter state. Its inclusion in many distribution package sets reflects netlink's role as the Linux kernel's preferred extensible networking control API.

### 使用方式

Callers use libnl core primitives for netlink sockets, message construction, parsing, send, receive, and cache handling, then add family-specific libraries when they need route, generic netlink, or netfilter support. The Homebrew package exposes many nl-* and nf-* command-line helpers around those APIs.

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

libnl matters to package maintainers because it is Linux-specific, ABI-sensitive, and central to network managers, firewall tools, wireless stacks, containers, and low-level diagnostics. The project's documented SONAME problems in releases 3.2.18 and 3.2.19 show why distributions track its ABI carefully.

### 时间线

- 1.1.x era: The project maintained a stable branch but later advised new applications to use libnl3.
- 3.2.10: The project reverted an unnecessary SONAME bump after discussion to reduce distribution-maintainer pain.
- 3.2.18-3.2.19: The project documented an incorrect SONAME that required affected binaries to be relinked for compatibility with 3.2.20 and later.
- 2014-07-16: The Infradead project page records libnl 3.2.25 as released.

### Related projects

- Related kernel interfaces include netlink, NETLINK_ROUTE, generic netlink, and netfilter.
- The libnl suite's related libraries include libnl, libnl-route, libnl-genl, and libnl-nf.

### 来源

- <https://github.com/thom311/libnl>
- <https://www.infradead.org/~tgr/libnl/>


## 安全说明

library-like package without higher-risk signals.

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

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

- Nix - libnl: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libnl/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - libnl - 3.12.0-1: normalized package name match | Arch Linux sync databases: libnl from https://geo.mirror.pkgbuild.com/core/os/x86_64/core.db.tar.gz | Library for applications dealing with netlink sockets | https://github.com/thom311/libnl/


## Combined YAML source

View the package source record on GitHub. [combined/libnl.yml](https://github.com/mxcl/pkgdb/blob/main/combined/libnl.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
