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

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

## 安装

```sh
sudo av install brew:usbredir
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install usbredir
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install usbredir
```

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

### Linux

- apk (92%):

```sh
sudo apk add usbredir
```

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

- dnf (92%):

```sh
sudo dnf install usbredir
```

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

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

- pacman (92%):

```sh
sudo pacman -S usbredir
```

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

- zypper (92%):

```sh
sudo zypper install usbredir
```

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

- Debian apt (92%):

```sh
sudo apt install libusbredirhost-dev
```

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

## 软件包事实

- **软件包键:** brew:usbredir
- **软件包管理器:** Homebrew
- **版本:** 0.15.0
- **来源摘要:** USB traffic redirection library
- **主页:** <https://www.spice-space.org>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- usbredirect (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

usbredir is both a network protocol for forwarding USB device traffic and the software package that implements it. The SPICE project documentation describes a parser library, a host-side library, and utilities that let a USB device attached to one machine appear inside another, commonly a virtual machine.

### 项目历史

The official Git history begins with an initial usbredir import on 2011-02-03. The protocol documentation records version 0.2 as the version demonstrated at FOSDEM 2011 and version 0.3, released on 2011-07-14, as the first stable version intended for later compatibility.

Although created for SPICE, the SPICE documentation explicitly says the protocol and usbredirhost library are independent of SPICE. That separation is important historically: usbredir became a reusable USB-over-network mechanism rather than only a private detail of one remote desktop stack.

The protocol continued to evolve through the early 2010s. The official protocol document records filtering support in version 0.4 in 2012, 64-bit packet IDs in 0.5, buffered bulk input in 0.6, and protocol version 0.7 in 2014 with bulk-stream changes.

### 采用历史

usbredir's main adoption path was virtualization. The SPICE page documents use with QEMU, libvirt, virt-manager, remote-viewer, and Windows clients using UsbDk, while also noting that the guest side is implemented for QEMU and shipped as part of QEMU.

The input package metadata lists usbredir across Alpine, Homebrew, Debian, Fedora, MacPorts, Nix, Arch, Ubuntu, and openSUSE package families. That spread matches its role as a low-level library used by virtualization stacks rather than as a daily end-user command.

### 使用方式

On the host side, applications provide a libusb device handle and callbacks for transporting usbredir data, then monitor usbredir and libusb events. The `usbredirect` utility can export a USB device over TCP as a client or server.

In VM workflows, users add USB redirection devices in virt-manager or libvirt XML, configure QEMU `usb-redir` devices and SPICE channels, and select devices from remote-viewer once the SPICE connection is established. Filtering rules can block or auto-connect devices by USB class, vendor, product, and version.

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

usbredir is package-nerd significant because it is the quiet glue behind a visible virtualization feature. Installing it satisfies build/runtime dependencies for QEMU/SPICE USB redirection and exposes the libraries that let packagers connect libusb, SPICE clients, and QEMU devices cleanly.

### 时间线

- 2011-02-03: Official Git history starts with initial usbredir import.
- 2011: Protocol version 0.2 demonstrated at FOSDEM.
- 2011-07-14: Protocol version 0.3 released as the first stable version.
- 2012: Protocol versions 0.4, 0.5, and 0.6 add filtering, 64-bit packet IDs, and buffered bulk input.
- 2014-05-19: Protocol version 0.7 released.
- 2025-01-27: Official tag usbredir-0.15.0 created.

### Related projects

- The official documentation ties usbredir to SPICE, QEMU, libvirt, virt-manager, remote-viewer, libusb, and UsbDk.

### 来源

- <https://gitlab.freedesktop.org/spice/usbredir>
- <https://gitlab.freedesktop.org/spice/usbredir/-/blob/main/docs/usb-redirection-protocol.md>
- <https://www.spice-space.org/usbredir.html>
- input source_facts.package-manager
- official git log and tags from https://gitlab.freedesktop.org/spice/usbredir.git


## 安全说明

library-like package without higher-risk signals.

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

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

- Debian apt - libusbredirhost-dev - 0.15.0-1: normalized package name match | Debian stable package indexes: libusbredirhost-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | implementing the usb-host (*) side of a usbredir connection (development) | https://www.spice-space.org/
- Debian apt - libusbredirhost1t64 - 0.15.0-1: normalized package name match | Debian stable package indexes: libusbredirhost1t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Implementing the usb-host (*) side of a usbredir connection (runtime) | https://www.spice-space.org/
- Debian apt - libusbredirparser-dev - 0.15.0-1: normalized package name match | Debian stable package indexes: libusbredirparser-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Parser for the usbredir protocol (development) | https://www.spice-space.org/
- Debian apt - libusbredirparser1t64 - 0.15.0-1: normalized package name match | Debian stable package indexes: libusbredirparser1t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Parser for the usbredir protocol (runtime) | https://www.spice-space.org/
- Debian apt - usbredirect - 0.15.0-1: normalized package name match | Debian stable package indexes: usbredirect from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Simple USB host TCP client | https://www.spice-space.org/
- Nix - usbredir: normalized package name match | nixpkgs package indexes: pkgs/by-name/us/usbredir/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libusbredirhost-dev - 0.13.0-2.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libusbredirhost-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | implementing the usb-host (*) side of a usbredir connection (development) | https://www.spice-space.org/
- Ubuntu apt - libusbredirhost1t64 - 0.13.0-2.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libusbredirhost1t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Implementing the usb-host (*) side of a usbredir connection (runtime) | https://www.spice-space.org/
- Ubuntu apt - libusbredirparser-dev - 0.13.0-2.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libusbredirparser-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Parser for the usbredir protocol (development) | https://www.spice-space.org/
- Ubuntu apt - libusbredirparser1t64 - 0.13.0-2.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libusbredirparser1t64 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Parser for the usbredir protocol (runtime) | https://www.spice-space.org/
- Ubuntu apt - usbredirect - 0.13.0-2.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: usbredirect from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Simple USB host TCP client | https://www.spice-space.org/
- apk - libusbredirhost - 0.14.0-r0: normalized package name match | Alpine Linux edge package indexes: libusbredirhost from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | USB network redirection protocol libraries | https://www.spice-space.org/usbredir.html
- apk - libusbredirparser - 0.14.0-r0: normalized package name match | Alpine Linux edge package indexes: libusbredirparser from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | USB network redirection protocol libraries | https://www.spice-space.org/usbredir.html
- apk - usbredir - 0.14.0-r0: normalized package name match | Alpine Linux edge package indexes: usbredir from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | USB network redirection protocol libraries | https://www.spice-space.org/usbredir.html
- apk - usbredir-dev - 0.14.0-r0: normalized package name match | Alpine Linux edge package indexes: usbredir-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | USB network redirection protocol libraries (development files) | https://www.spice-space.org/usbredir.html
- apk - usbredir-doc - 0.14.0-r0: normalized package name match | Alpine Linux edge package indexes: usbredir-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | USB network redirection protocol libraries (documentation) | https://www.spice-space.org/usbredir.html


## Combined YAML source

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