# 使用 Homebrew, apk, dnf, Nix, pacman, apt, zypper 安装 alsa-lib

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

## 安装

```sh
sudo av install brew:alsa-lib
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install alsa-lib
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add alsa-lib
```

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

- dnf (92%):

```sh
sudo dnf install alsa-lib
```

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

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

- pacman (92%):

```sh
sudo pacman -S alsa-lib
```

  证据: Arch Linux sync databases: alsa-lib from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- Debian apt (92%):

```sh
sudo apt install libasound2-data
```

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

- zypper (92%):

```sh
sudo zypper install libasound2
```

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

## 软件包事实

- **软件包键:** brew:alsa-lib
- **软件包管理器:** Homebrew
- **版本:** 1.2.16.1
- **来源摘要:** Provides audio and MIDI functionality to the Linux operating system
- **主页:** <https://www.alsa-project.org/>
- **最后更新:** 2026-06-14T23:50:54Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- aserver (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

alsa-lib is the user-space C library for the Advanced Linux Sound Architecture, the Linux audio and MIDI stack normally abbreviated ALSA. It is the layer that lets applications talk to the ALSA kernel API through a stable library API, while adding higher-level helpers, plugin support, and configuration machinery that would be awkward for each application to implement directly.

### 项目历史

The ALSA project was founded by Jaroslav Kysela and grew around the goal of replacing and extending the older Open Sound System model on Linux. Official ALSA documentation describes ALSA as providing audio and MIDI functionality for Linux, with modular drivers, SMP/thread-safe design, OSS compatibility, and a user-space library named alsa-lib to simplify application programming.

alsa-lib became one of the core split-out ALSA components alongside the kernel driver code, alsa-utils, alsa-tools, and later configuration packages such as alsa-ucm-conf. The official library reference credits Jaroslav Kysela, Abramo Bagnara, Takashi Iwai, and Frank van de Pol as authors and describes the library API as the preferred interface for application programmers rather than using the kernel API directly.

### 采用历史

The ALSA introduction notes that ALSA driver code was included in Linux 2.6, which made the ALSA stack the default assumption for most Linux desktop, embedded, and pro-audio packaging. As a result, alsa-lib became a dependency that package maintainers encounter indirectly through audio applications, desktop environments, media players, sound servers, MIDI tools, and compatibility layers.

The library continues to be released as a separately versioned package. The ALSA project news and git history show coordinated alsa-lib releases with related ALSA components, including the 1.2.16 and 1.2.16.1 releases in June 2026.

### 使用方式

Developers use alsa-lib for PCM audio, mixer controls, sequencer, raw MIDI, timers, topology, and use-case manager APIs. End users usually meet it through configuration files rather than by invoking it directly: system defaults are loaded through alsa.conf and per-machine or per-user overrides are commonly placed in asound.conf or .asoundrc files.

The source configuration file loads system and user configuration snippets from locations such as /etc/asound.conf, ~/.asoundrc, and $XDG_CONFIG_HOME/alsa/asoundrc, which explains why distribution packaging and local audio troubleshooting often revolve around these paths.

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

For package people, alsa-lib is plumbing with a very large reverse-dependency shadow. It is small enough to look like a library package, but central enough that ABI, plugin paths, default configuration, UCM data, and cross-distro path choices can affect whole desktops and audio stacks.

It also matters historically because it marks the Unix audio transition from OSS compatibility toward the ALSA model that PulseAudio, JACK bridges, PipeWire compatibility layers, and many direct audio applications have had to understand.

### 时间线

- 2003: ALSA driver code is included in Linux 2.6.
- 2018: The alsa-project/alsa-lib GitHub repository is created as an official source mirror/development surface.
- 2026-06-01: ALSA releases alsa-lib 1.2.16 with related ALSA components.
- 2026-06-12: ALSA releases alsa-lib 1.2.16.1.

### Related projects

- alsa-utils provides command-line tools such as aplay, arecord, alsamixer, and alsactl that sit beside alsa-lib in most distributions.
- alsa-ucm-conf and alsa-topology-conf carry machine and DSP configuration data consumed through alsa-lib interfaces.
- PipeWire, PulseAudio, JACK, media players, and many native Linux audio applications depend on ALSA compatibility or direct ALSA access.

### 来源

- <https://git.alsa-project.org/?p=alsa-lib.git;a=summary>
- <https://raw.githubusercontent.com/alsa-project/alsa-lib/master/README.md>
- <https://raw.githubusercontent.com/alsa-project/alsa-lib/master/src/conf/alsa.conf>
- <https://www.alsa-project.org/alsa-doc/alsa-lib/>
- <https://www.alsa-project.org/wiki/Alsa_Team>
- <https://www.alsa-project.org/wiki/Introduction>
- <https://www.alsa-project.org/wiki/Main_Page>


## 安全说明

broad file, network, media, or database tool signal.

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Linux: /usr/share/alsa/alsa.conf, /etc/asound.conf, ~/.asoundrc, ~/.config/alsa/asoundrc
## 其他软件包管理器记录

- Debian apt - libasound2-data - 1.2.14-1: normalized package name match | Debian stable package indexes: libasound2-data from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Configuration files and profiles for ALSA drivers | https://www.alsa-project.org/
- Debian apt - libasound2-dev - 1.2.14-1: normalized package name match | Debian stable package indexes: libasound2-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | shared library for ALSA applications -- development files | https://www.alsa-project.org/
- Debian apt - libasound2-doc - 1.2.14-1: normalized package name match | Debian stable package indexes: libasound2-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | documentation for user-space ALSA application programming | https://www.alsa-project.org/
- Debian apt - libasound2-plugin-smixer - 1.2.14-1: normalized package name match | Debian stable package indexes: libasound2-plugin-smixer from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | smixer plugin for ALSA library | https://www.alsa-project.org/
- Debian apt - libasound2t64 - 1.2.14-1: normalized package name match | Debian stable package indexes: libasound2t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | shared library for ALSA applications | https://www.alsa-project.org/
- Debian apt - libatopology-dev - 1.2.14-1: normalized package name match | Debian stable package indexes: libatopology-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | shared library for handling ALSA topology -- development files | https://www.alsa-project.org/
- Debian apt - libatopology2t64 - 1.2.14-1: normalized package name match | Debian stable package indexes: libatopology2t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | shared library for handling ALSA topology definitions | https://www.alsa-project.org/
- Nix - alsa-lib: normalized package name match | nixpkgs package indexes: pkgs/by-name/al/alsa-lib/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libasound2-data - 1.2.11-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libasound2-data from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Configuration files and profiles for ALSA drivers | https://www.alsa-project.org/
- Ubuntu apt - libasound2-dev - 1.2.11-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libasound2-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | shared library for ALSA applications -- development files | https://www.alsa-project.org/
- Ubuntu apt - libasound2-doc - 1.2.11-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libasound2-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | documentation for user-space ALSA application programming | https://www.alsa-project.org/
- Ubuntu apt - libasound2-plugin-smixer - 1.2.11-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libasound2-plugin-smixer from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | smixer plugin for ALSA library | https://www.alsa-project.org/
- Ubuntu apt - libasound2t64 - 1.2.11-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libasound2t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | shared library for ALSA applications | https://www.alsa-project.org/
- Ubuntu apt - libatopology-dev - 1.2.11-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libatopology-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | shared library for handling ALSA topology -- development files | https://www.alsa-project.org/
- Ubuntu apt - libatopology2t64 - 1.2.11-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libatopology2t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | shared library for handling ALSA topology definitions | https://www.alsa-project.org/
- apk - alsa-lib - 1.2.16.1-r0: normalized package name match | Alpine Linux edge package indexes: alsa-lib from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Advanced Linux Sound Architecture (ALSA) library | https://alsa-project.org/


## Combined YAML source

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


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
