# 使用 Homebrew, apk, dnf, MacPorts, Nix, pacman, apt, zypper 安装 libevent

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

## 安装

```sh
sudo av install brew:libevent
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libevent
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libevent
```

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

### Linux

- apk (92%):

```sh
sudo apk add libevent
```

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

- dnf (92%):

```sh
sudo dnf install libevent
```

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

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

- pacman (92%):

```sh
sudo pacman -S libevent
```

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

- Debian apt (92%):

```sh
sudo apt install libevent-2.1-7t64
```

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

- zypper (92%):

```sh
sudo zypper install libevent-2_1-7
```

  证据: openSUSE Tumbleweed package metadata: libevent-2_1-7 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst

## 软件包事实

- **软件包键:** brew:libevent
- **软件包管理器:** Homebrew
- **版本:** 2.1.13
- **来源摘要:** Asynchronous event library
- **主页:** <https://libevent.org/>
- **仓库:** <https://github.com/libevent/libevent>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- event_rpcgen.py (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

libevent is a portable C event-notification library for scalable network servers and event-driven programs.

### 项目历史

The libevent site describes the library as a replacement for hand-written event loops in network servers: programs register callbacks for file-descriptor readiness, timers, signals, and higher-level buffered I/O rather than hard-coding select or poll loops. The site credits maintenance to Nick Mathewson, Azat Khuzhin, and Niels Provos.

The project grew around the C10K-era problem of serving many simultaneous connections portably across backends such as select, poll, epoll, kqueue, /dev/poll, Solaris event ports, and Windows APIs. Over time it added buffered network I/O, DNS, HTTP, RPC, SSL-capable bufferevents, thread hooks, and extensive portability code.

### 采用历史

The official site lists widely used downstreams including Chromium, memcached, Transmission, NTP's SNTP code, tmux, Tor, Prosody, PgBouncer, and coturn. That breadth made libevent one of the standard C event-loop dependencies in Unix package collections.

### 使用方式

Typical applications create an event_base, register events or bufferevents, and run event_base_dispatch. The official documentation covers setup, event bases, timers, buffered I/O, asynchronous DNS, embedded HTTP servers, and RPC support.

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

libevent is package-nerd-famous because it abstracts the messy portability matrix behind scalable C networking. It is old enough to show up in classic daemons and new enough to have ABI/API reports, split libraries, CMake and autotools history, and long-lived 1.4, 2.0, and 2.1 release lines.

### 时间线

- 2009: Niels Provos announced libevent 1.4.12-stable and libevent 2.0.2-alpha on July 29, 2009.
- 2010: The libevent site lists libevent-1.4.14b-stable released June 7, 2010.
- 2012: The libevent site lists the first 2.1.x alpha release on April 3, 2012 and libevent-2.0.21-stable released November 18, 2012.
- 2014: The libevent site lists libevent-2.0.22-stable released January 5, 2014.
- 2017: The libevent site lists libevent-2.1.8-stable released January 22, 2017.
- 2020: The libevent site lists libevent-2.1.12-stable released July 5, 2020.
- 2023: The libevent site lists libevent-2.2.1-alpha-dev released May 21, 2023.

### Related projects

- Related event-loop and networking projects include libev, libuv, Boost.Asio, and downstream users such as Tor, memcached, tmux, Transmission, Chromium, PgBouncer, and coturn.

### 来源

- <https://github.com/libevent/libevent>
- <https://libevent.org/>
- <https://libevent.org/doc/>
- <https://libevent.org/libevent-book/>
- <https://www.provos.org/p/new-libevent-releases/>


## 安全说明

library-like package without higher-risk signals.

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

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

- Debian apt - libevent-2.1-7t64 - 2.1.12-stable-10+b1: normalized package name match | Debian stable package indexes: libevent-2.1-7t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Asynchronous event notification library | https://libevent.org/
- Debian apt - libevent-core-2.1-7t64 - 2.1.12-stable-10+b1: normalized package name match | Debian stable package indexes: libevent-core-2.1-7t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Asynchronous event notification library (core) | https://libevent.org/
- Debian apt - libevent-dev - 2.1.12-stable-10+b1: normalized package name match | Debian stable package indexes: libevent-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Asynchronous event notification library (development files) | https://libevent.org/
- Debian apt - libevent-extra-2.1-7t64 - 2.1.12-stable-10+b1: normalized package name match | Debian stable package indexes: libevent-extra-2.1-7t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Asynchronous event notification library (extra) | https://libevent.org/
- Debian apt - libevent-openssl-2.1-7t64 - 2.1.12-stable-10+b1: normalized package name match | Debian stable package indexes: libevent-openssl-2.1-7t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Asynchronous event notification library (openssl) | https://libevent.org/
- Debian apt - libevent-pthreads-2.1-7t64 - 2.1.12-stable-10+b1: normalized package name match | Debian stable package indexes: libevent-pthreads-2.1-7t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Asynchronous event notification library (pthreads) | https://libevent.org/
- Nix - libevent: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libevent/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libevent-2.1-7t64 - 2.1.12-stable-9ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libevent-2.1-7t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Asynchronous event notification library | https://libevent.org/
- Ubuntu apt - libevent-core-2.1-7t64 - 2.1.12-stable-9ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libevent-core-2.1-7t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Asynchronous event notification library (core) | https://libevent.org/
- Ubuntu apt - libevent-dev - 2.1.12-stable-9ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libevent-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Asynchronous event notification library (development files) | https://libevent.org/
- Ubuntu apt - libevent-extra-2.1-7t64 - 2.1.12-stable-9ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libevent-extra-2.1-7t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Asynchronous event notification library (extra) | https://libevent.org/
- Ubuntu apt - libevent-openssl-2.1-7t64 - 2.1.12-stable-9ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libevent-openssl-2.1-7t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Asynchronous event notification library (openssl) | https://libevent.org/
- Ubuntu apt - libevent-pthreads-2.1-7t64 - 2.1.12-stable-9ubuntu2: normalized package name match | Ubuntu 24.04 LTS package indexes: libevent-pthreads-2.1-7t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Asynchronous event notification library (pthreads) | https://libevent.org/
- apk - libevent - 2.1.13-r0: normalized package name match | Alpine Linux edge package indexes: libevent from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | An event notification library | https://libevent.org/
- apk - libevent-dev - 2.1.13-r0: normalized package name match | Alpine Linux edge package indexes: libevent-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | An event notification library (development files) | https://libevent.org/
- apk - libevent-static - 2.1.13-r0: normalized package name match | Alpine Linux edge package indexes: libevent-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | An event notification library (static libraries) | https://libevent.org/


## Combined YAML source

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