# 使用 Homebrew, apk, apt, dnf, pacman, zypper 安装 libgusb

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

## 安装

```sh
sudo av install brew:libgusb
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libgusb
```

  证据: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add libgusb
```

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

- Debian apt (92%):

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

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

- dnf (92%):

```sh
sudo dnf install libgusb
```

  证据: Fedora Rawhide package metadata: libgusb from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- pacman (92%):

```sh
sudo pacman -S libgusb
```

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

- zypper (92%):

```sh
sudo zypper install libgusb-devel
```

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

## 软件包事实

- **软件包键:** brew:libgusb
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/libgusb>
- **版本:** 0.4.9
- **来源摘要:** GObject wrappers for libusb1
- **主页:** <https://github.com/hughsie/libgusb>
- **仓库:** <https://github.com/hughsie/libgusb>
- **上游文档:** <https://github.com/hughsie/libgusb#readme>
- **许可证:** LGPL-2.1-or-later
- **源码归档:** <https://github.com/hughsie/libgusb/archive/refs/tags/0.4.9.tar.gz>
- **已生成:** 2026-07-08T18:08:21+00:00

## 可执行文件

- gusbcmd (cli)
- gusbcmd (别名)

## 依赖

- glib
- json-glib
- libusb
- python@3.14
- usb.ids

## 构建依赖

- gobject-introspection
- meson
- ninja
- pkgconf
- python-setuptools
- vala

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-07-08
- 管理器版本: 0.4.9
- 本地数据: OK
- 上游仓库: https://github.com/hughsie/libgusb
- 检测到的最新版本: 0.4.9 (当前)
- 信息: No package-manager update timestamp was available.
## 项目历史与用法

GUsb is a small GLib/GObject wrapper around libusb1, intended to make asynchronous USB transfers fit naturally into GLib main-loop applications and system daemons. It is package-nerd useful because it turns low-level USB plumbing into a library that GNOME-style C programs can consume without each one hand-rolling libusb integration.

### 项目历史

The upstream README describes GUsb as a GObject wrapper for libusb1 with asynchronous control, bulk, and interrupt transfers, cancellation support, and main-loop integration. Its scope is intentionally narrower than libusb itself: not every libusb operation is wrapped, but the project accepts feature requests when the wrapper fits the library's purpose.

Release notes show the library moving beyond simple device access into testability and serialization work. Version 0.4.0, released on September 12, 2022, added BOS descriptor support, JSON serialization of GUsbDevice objects, and emulated USB-device replay. Version 0.4.9, released on April 22, 2024, focused on HID descriptor handling, handle cleanup, and emulator safety fixes.

### 采用历史

GUsb is packaged broadly because GLib-based desktop and device-management software often needs USB access without depending directly on raw libusb callbacks. The batch input lists Alpine, Homebrew, Debian, Fedora, Arch, Ubuntu, and openSUSE package names, including GObject Introspection packages on Debian and Ubuntu.

### 使用方式

Applications and daemons use GUsb to enumerate devices, perform asynchronous USB transfers, respond to hotplug events, and integrate those operations with GLib cancellation and event handling. The gusbcmd executable provides a small command-line surface for inspecting or exercising the library.

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

GUsb sits in the classic GNOME plumbing layer: it is not a user-facing app, but it lets firmware tools, hardware managers, and desktop services share one USB abstraction. The JSON and emulation additions in the 0.4 series also make it attractive for repeatable tests around hardware behavior.

### 时间线

- 2021-03-12: Version 0.3.6 added string-descriptor byte APIs and Darwin dylib fixes.
- 2022-09-12: Version 0.4.0 added JSON serialization and device emulation support.
- 2022-10-01: Version 0.4.1 ported documentation from gtk-doc to gi-docgen.
- 2024-04-22: Version 0.4.9 fixed HID descriptor, libusb handle, and emulator issues.

### Related projects

- libusb1 is the low-level USB library wrapped by GUsb.
- GLib, GObject, and GIO provide the application framework integration targeted by GUsb.
- GObject Introspection packages expose GUsb to language bindings in distributions such as Debian and Ubuntu.

### 来源

- <https://formulae.brew.sh/formula/libgusb>
- <https://github.com/hughsie/libgusb>
- <https://raw.githubusercontent.com/hughsie/libgusb/main/NEWS>
- <https://raw.githubusercontent.com/hughsie/libgusb/main/README.md>
- <https://raw.githubusercontent.com/hughsie/libgusb/main/meson.build>


## 安全说明

library-like package without higher-risk signals.

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** libgusb
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

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

- Debian apt - gir1.2-gusb-1.0 - 0.4.9-1+b1: normalized package name match | Debian stable package indexes: gir1.2-gusb-1.0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GObject introspection data for libgusb | https://github.com/hughsie/libgusb
- Debian apt - libgusb-dev - 0.4.9-1+b1: normalized package name match | Debian stable package indexes: libgusb-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GLib wrapper around libusb1 - development files | https://github.com/hughsie/libgusb
- Debian apt - libgusb-doc - 0.4.9-1: normalized package name match | Debian stable package indexes: libgusb-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GLib wrapper around libusb1 - documentation | https://github.com/hughsie/libgusb
- Debian apt - libgusb2 - 0.4.9-1+b1: normalized package name match | Debian stable package indexes: libgusb2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | GLib wrapper around libusb1 | https://github.com/hughsie/libgusb
- Ubuntu apt - gir1.2-gusb-1.0 - 0.4.8-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: gir1.2-gusb-1.0 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GObject introspection data for libgusb | https://github.com/hughsie/libgusb
- Ubuntu apt - libgusb-dev - 0.4.8-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libgusb-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GLib wrapper around libusb1 - development files | https://github.com/hughsie/libgusb
- Ubuntu apt - libgusb-doc - 0.4.8-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libgusb-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GLib wrapper around libusb1 - documentation | https://github.com/hughsie/libgusb
- Ubuntu apt - libgusb2 - 0.4.8-1build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libgusb2 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | GLib wrapper around libusb1 | https://github.com/hughsie/libgusb
- apk - libgusb - 0.4.9-r1: normalized package name match | Alpine Linux edge package indexes: libgusb from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | GLib wrapper around libusb | https://github.com/hughsie/libgusb
- apk - libgusb-dev - 0.4.9-r1: normalized package name match | Alpine Linux edge package indexes: libgusb-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | GLib wrapper around libusb (development files) | https://github.com/hughsie/libgusb
- apk - libgusb-utils - 0.4.9-r1: normalized package name match | Alpine Linux edge package indexes: libgusb-utils from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | GLib wrapper around libusb (utils) | https://github.com/hughsie/libgusb
- dnf - libgusb - 0.4.9-5.fc44: normalized package name match | Fedora Rawhide package metadata: libgusb from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | GLib wrapper around libusb1 | https://github.com/hughsie/libgusb
- dnf - libgusb-devel - 0.4.9-5.fc44: normalized package name match | Fedora Rawhide package metadata: libgusb-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Libraries and headers for gusb | https://github.com/hughsie/libgusb
- pacman - libgusb - 0.4.9-2: normalized package name match | Arch Linux sync databases: libgusb from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | GObject wrapper for libusb1 | https://github.com/hughsie/libgusb
- zypper - libgusb-devel - 0.4.9-1.6: normalized package name match | openSUSE Tumbleweed package metadata: libgusb-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Development files for libgusb, a GObject-based wrapper for libusb1 | https://github.com/hughsie/libgusb
- zypper - libgusb2 - 0.4.9-1.6: normalized package name match | openSUSE Tumbleweed package metadata: libgusb2 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | GObject-based library for libusb1 | https://github.com/hughsie/libgusb


## 相关链接

- [Source-control packages](https://www.automicvault.com/zh-hans/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/zh-hans/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/zh-hans/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Homebrew utility packages](https://www.automicvault.com/zh-hans/pkg/brew-utility-packages/) - Matched Homebrew package provider.
- [glib](https://www.automicvault.com/zh-hans/pkg/brew/glib/) - Runtime dependency declared by Homebrew.
- [json-glib](https://www.automicvault.com/zh-hans/pkg/brew/json-glib/) - Runtime dependency declared by Homebrew.
- [python@3.14](https://www.automicvault.com/zh-hans/pkg/brew/python-3-14/) - Runtime dependency declared by Homebrew.
- [gobject-introspection](https://www.automicvault.com/zh-hans/pkg/brew/gobject-introspection/) - Build dependency declared by Homebrew.
- [meson](https://www.automicvault.com/zh-hans/pkg/brew/meson/) - Build dependency declared by Homebrew.
- [ninja](https://www.automicvault.com/zh-hans/pkg/brew/ninja/) - Build dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/zh-hans/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [simple-scan](https://www.automicvault.com/zh-hans/pkg/brew/simple-scan/) - Popular package that depends on this formula.
- [libusb-compat](https://www.automicvault.com/zh-hans/pkg/brew/libusb-compat/) - Shares av.db curated category or tags: cli, system, usb.
- [lsusb](https://www.automicvault.com/zh-hans/pkg/brew/lsusb/) - Shares av.db curated category or tags: cli, system, usb.
- [blink1](https://www.automicvault.com/zh-hans/pkg/brew/blink1/) - Shares av.db curated category or tags: cli, system, usb.
- [bootloadhid](https://www.automicvault.com/zh-hans/pkg/brew/bootloadhid/) - Shares av.db curated category or tags: cli, system, usb.
- [crun](https://www.automicvault.com/zh-hans/pkg/brew/crun/) - Shares av.db curated category or tags: c-library, cli, system.
- [cyme](https://www.automicvault.com/zh-hans/pkg/brew/cyme/) - Shares av.db curated category or tags: cli, system, usb.
- [dbus-glib](https://www.automicvault.com/zh-hans/pkg/brew/dbus-glib/) - Shares av.db curated category or tags: cli, glib, system.
- [dcled](https://www.automicvault.com/zh-hans/pkg/brew/dcled/) - Shares av.db curated category or tags: cli, system, usb.
- [fwupd](https://www.automicvault.com/zh-hans/pkg/brew/fwupd/) - Local package facts share a topical domain. Shared terms: cli, glib, ids, libusb, system.
- [appstream-glib](https://www.automicvault.com/zh-hans/pkg/brew/appstream-glib/) - Both packages work with overlapping file formats or content types. Shared terms: cli, glib, json, json-glib, system.
- [dfu-programmer](https://www.automicvault.com/zh-hans/pkg/brew/dfu-programmer/) - Local package facts share a topical domain. Shared terms: cli, libusb, system, usb.

## Combined YAML source

View the package source record on GitHub. [combined/libgusb.yml](https://github.com/automic-vault/db/blob/main/combined/libgusb.yml)


## 来源

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
