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

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

## 安装

```sh
sudo av install brew:libxmlb
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libxmlb
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libxmlb
```

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

### Linux

- apk (92%):

```sh
sudo apk add libxmlb
```

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

- dnf (92%):

```sh
sudo dnf install libxmlb
```

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

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

- pacman (92%):

```sh
sudo pacman -S libxmlb
```

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

- Debian apt (92%):

```sh
sudo apt install gir1.2-xmlb-2.0
```

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

- zypper (92%):

```sh
sudo zypper install libxmlb-devel
```

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

## 软件包事实

- **软件包键:** brew:libxmlb
- **软件包管理器:** Homebrew
- **版本:** 0.3.29
- **来源摘要:** Library for querying compressed XML metadata
- **主页:** <https://github.com/hughsie/libxmlb>
- **仓库:** <https://github.com/hughsie/libxmlb>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- xb-tool (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

libxmlb is a small system library for compiling XML metadata into a binary representation that can be memory-mapped and queried quickly. It is most associated with desktop and firmware metadata workflows where large XML files need repeated lookups.

### 项目历史

Richard Hughes' README frames the project around the cost of parsing XML and the inability to mmap normal XML strings directly. libxmlb converts XML into a structured binary format with a deduplicated string table and NUL-terminated strings, trading compactness for fast queries and near zero-copy access.

The first visible 0.1.0 GitHub tag points to a commit dated 2018-10-04. The design is intentionally narrow: it implements only a subset of XPath and ships xb-tool for compiling and querying binary XML.

### 采用历史

libxmlb became useful in Linux desktop plumbing because projects such as AppStream and fwupd deal in large XML metadata collections. The same maintainer ecosystem around GNOME, fwupd, and LVFS made the binary metadata cache a practical dependency for package and firmware tooling.

### 使用方式

Typical usage is to compile XML metadata into an .xmlb file and query it with xb-tool or through the library API. It is a cache/query accelerator, not a general-purpose XML replacement.

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

libxmlb matters to package nerds because it sits where package metadata, desktop app metadata, and firmware metadata meet performance constraints. It turns text metadata into a binary cache that package managers and desktop software centers can query cheaply.

### 时间线

- 2018: The 0.1.0 tag points to a commit dated 2018-10-04.
- 2019: AppStream discussions describe LVFS and fwupd as using AppStream metadata for firmware metadata.
- 2020s: libxmlb is packaged across Linux distributions and Homebrew as xb-tool and the libxmlb library.

### Related projects

- fwupd, LVFS, AppStream, GNOME Software, and other metadata-heavy desktop tools are the neighboring ecosystem. libxml2 remains the broader XML library; libxmlb is the binary metadata cache layer.

### 来源

- <https://api.github.com/repos/hughsie/libxmlb/commits/a5878a07a6a1bafce8857be2bb9316fffa9907f3>
- <https://blog.tenstral.net/2020/01/a-big-appstream-status-update.html>
- <https://github.com/hughsie/libxmlb>
- <https://raw.githubusercontent.com/hughsie/libxmlb/main/README.md>


## 安全说明

没有找到 libxmlb 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


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

- Debian apt - gir1.2-xmlb-2.0 - 0.3.22-1: normalized package name match | Debian stable package indexes: gir1.2-xmlb-2.0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GObject introspection data for libxmlb | https://github.com/hughsie/libxmlb
- Debian apt - libxmlb-dev - 0.3.22-1: normalized package name match | Debian stable package indexes: libxmlb-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development files for libxmlb | https://github.com/hughsie/libxmlb
- Debian apt - libxmlb-tests - 0.3.22-1: normalized package name match | Debian stable package indexes: libxmlb-tests from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Installed tests for libxmlb2 | https://github.com/hughsie/libxmlb
- Debian apt - libxmlb-utils - 0.3.22-1: normalized package name match | Debian stable package indexes: libxmlb-utils from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Binary XML library - Command-line utility | https://github.com/hughsie/libxmlb
- Debian apt - libxmlb2 - 0.3.22-1: normalized package name match | Debian stable package indexes: libxmlb2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Binary XML library | https://github.com/hughsie/libxmlb
- Nix - libxmlb: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libxmlb/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gir1.2-xmlb-2.0 - 0.3.18-1: normalized package name match | Ubuntu 24.04 LTS package indexes: gir1.2-xmlb-2.0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GObject introspection data for libxmlb | https://github.com/hughsie/libxmlb
- Ubuntu apt - libxmlb-dev - 0.3.18-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libxmlb-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Development files for libxmlb | https://github.com/hughsie/libxmlb
- Ubuntu apt - libxmlb-tests - 0.3.18-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libxmlb-tests from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Installed tests for libxmlb2 | https://github.com/hughsie/libxmlb
- Ubuntu apt - libxmlb-utils - 0.3.18-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libxmlb-utils from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Binary XML library - Command-line utility | https://github.com/hughsie/libxmlb
- Ubuntu apt - libxmlb2 - 0.3.18-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libxmlb2 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Binary XML library | https://github.com/hughsie/libxmlb
- apk - libxmlb - 0.3.29-r0: normalized package name match | Alpine Linux edge package indexes: libxmlb from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library to help create and query binary XML blobs | https://github.com/hughsie/libxmlb
- apk - libxmlb-dbg - 0.3.29-r0: normalized package name match | Alpine Linux edge package indexes: libxmlb-dbg from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library to help create and query binary XML blobs (debug symbols) | https://github.com/hughsie/libxmlb
- apk - libxmlb-dev - 0.3.29-r0: normalized package name match | Alpine Linux edge package indexes: libxmlb-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library to help create and query binary XML blobs (development files) | https://github.com/hughsie/libxmlb
- apk - libxmlb-doc - 0.3.29-r0: normalized package name match | Alpine Linux edge package indexes: libxmlb-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library to help create and query binary XML blobs (documentation) | https://github.com/hughsie/libxmlb
- dnf - libxmlb - 0.3.29-1.fc45: normalized package name match | Fedora Rawhide package metadata: libxmlb from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Library for querying compressed XML metadata | https://github.com/hughsie/libxmlb


## Combined YAML source

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