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

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

## 安装

```sh
sudo av install brew:libosinfo
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libosinfo
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libosinfo
```

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

### Linux

- apk (92%):

```sh
sudo apk add libosinfo
```

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

- dnf (92%):

```sh
sudo dnf install libosinfo
```

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

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

- pacman (92%):

```sh
sudo pacman -S libosinfo
```

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

- zypper (92%):

```sh
sudo zypper install libosinfo
```

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

- Debian apt (92%):

```sh
sudo apt install gir1.2-libosinfo-1.0
```

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

## 软件包事实

- **软件包键:** brew:libosinfo
- **软件包管理器:** Homebrew
- **版本:** 1.12.0
- **来源摘要:** Operating System information database
- **主页:** <https://libosinfo.org/>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- osinfo-detect (别名)
- osinfo-install-script (别名)
- osinfo-query (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

libosinfo is the C/GObject library in the libosinfo family: a shared database, API, and set of command-line tools for describing guest operating systems, hypervisors, virtual hardware, install media, and installation resources used by virtualization provisioning tools.

### 项目历史

The project published its first public libosinfo tag in October 2011, after establishing a model in which operating-system facts live in a common XML database and applications query them through a reusable library rather than carrying their own detection tables. The official site describes the project as three cooperating parts: metadata database, GObject API, and query/extraction tools.

By 2016 the project had formalized adjacent pieces such as osinfo-db-tools for importing, exporting, validating, and packaging the database files, and libosinfo 1.0.0 was tagged in October 2016. Later releases continued the steady maintenance pattern expected from low-level virtualization infrastructure: translation updates, build-system work, memory fixes, and compatibility with XML library changes.

### 采用历史

libosinfo became useful wherever virtual-machine front ends need to choose sane defaults for a guest: identifying ISO media, mapping an OS to supported virtual devices, finding install trees, and generating unattended-install scripts. Its value is strongest in Linux virtualization stacks because multiple applications can share the same operating-system knowledge instead of each shipping stale lists.

### 使用方式

Packagers usually split the ecosystem into libosinfo, osinfo-db, and osinfo-db-tools. The library is consumed by programs through the C API or GObject Introspection bindings, while users and maintainers interact with tools such as osinfo-query, osinfo-detect, osinfo-install-script, and osinfo-db-import.

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

For package maintainers, libosinfo is a classic data-versus-code package: the library changes slowly, but the OS database needs frequent updates as distributions, Windows releases, and install media change. That split explains why package freshness can visibly affect VM creation dialogs and automated provisioning even when the hypervisor itself is working.

### 时间线

- 2011: libosinfo v0.0.1 was tagged as the first public release.
- 2016: osinfo-db-tools was created for managing libosinfo database files.
- 2016: libosinfo v1.0.0 was tagged.
- 2024: libosinfo 1.12.0 and osinfo-db-tools 1.12.0 release notes listed maintenance fixes, CI work, and translation updates.

### Related projects

- osinfo-db supplies the XML operating-system data consumed by libosinfo.
- osinfo-db-tools provides import, export, validation, and packaging tools for the database.
- libvirt and desktop virtualization front ends are the natural consumers of the metadata model because they need OS-aware guest defaults.

### 来源

- <https://gitlab.com/libosinfo/libosinfo/-/tags>
- <https://gitlab.com/libosinfo/libosinfo/-/tags?page=2>
- <https://gitlab.com/libosinfo/osinfo-db-tools>
- <https://libosinfo.org/>
- <https://libosinfo.org/download.html>


## 安全说明

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

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

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

- Debian apt - gir1.2-libosinfo-1.0 - 1.12.0-2: normalized package name match | Debian stable package indexes: gir1.2-libosinfo-1.0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GObject introspection data for libosinfo | https://libosinfo.org/
- Debian apt - libosinfo-1.0-0 - 1.12.0-2: normalized package name match | Debian stable package indexes: libosinfo-1.0-0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Library for managing information about operating systems and hypervisors | https://libosinfo.org/
- Debian apt - libosinfo-1.0-dev - 1.12.0-2: normalized package name match | Debian stable package indexes: libosinfo-1.0-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | libosinfo development files | https://libosinfo.org/
- Debian apt - libosinfo-bin - 1.12.0-2: normalized package name match | Debian stable package indexes: libosinfo-bin from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Tools for querying the osinfo database via libosinfo | https://libosinfo.org/
- Debian apt - libosinfo-l10n - 1.12.0-2: normalized package name match | Debian stable package indexes: libosinfo-l10n from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Translations for libosinfo | https://libosinfo.org/
- Nix - libosinfo: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libosinfo/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gir1.2-libosinfo-1.0 - 1.11.0-2build3: normalized package name match | Ubuntu 24.04 LTS package indexes: gir1.2-libosinfo-1.0 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | GObject introspection data for libosinfo | https://libosinfo.org/
- Ubuntu apt - libosinfo-1.0-0 - 1.11.0-2build3: normalized package name match | Ubuntu 24.04 LTS package indexes: libosinfo-1.0-0 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Library for managing information about operating systems and hypervisors | https://libosinfo.org/
- Ubuntu apt - libosinfo-1.0-dev - 1.11.0-2build3: normalized package name match | Ubuntu 24.04 LTS package indexes: libosinfo-1.0-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | libosinfo development files | https://libosinfo.org/
- Ubuntu apt - libosinfo-bin - 1.11.0-2build3: normalized package name match | Ubuntu 24.04 LTS package indexes: libosinfo-bin from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Tools for querying the osinfo database via libosinfo | https://libosinfo.org/
- Ubuntu apt - libosinfo-l10n - 1.11.0-2build3: normalized package name match | Ubuntu 24.04 LTS package indexes: libosinfo-l10n from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Translations for libosinfo | https://libosinfo.org/
- apk - libosinfo - 1.12.0-r0: normalized package name match | Alpine Linux edge package indexes: libosinfo from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | library for managing OS information for virtualization | https://libosinfo.org/
- apk - libosinfo-dev - 1.12.0-r0: normalized package name match | Alpine Linux edge package indexes: libosinfo-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | library for managing OS information for virtualization (development files) | https://libosinfo.org/
- apk - libosinfo-doc - 1.12.0-r0: normalized package name match | Alpine Linux edge package indexes: libosinfo-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | library for managing OS information for virtualization (documentation) | https://libosinfo.org/
- apk - libosinfo-lang - 1.12.0-r0: normalized package name match | Alpine Linux edge package indexes: libosinfo-lang from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Languages for package libosinfo | https://libosinfo.org/
- dnf - libosinfo - 1.12.0-10.fc45: normalized package name match | Fedora Rawhide package metadata: libosinfo from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A library for managing OS information for virtualization | https://libosinfo.org/


## Combined YAML source

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