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

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

## 安装

```sh
sudo av install brew:libyubikey
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libyubikey
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libyubikey
```

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

### Linux

- dnf (92%):

```sh
sudo dnf install libyubikey
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#libyubikey
```

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

- Debian apt (92%):

```sh
sudo apt install libyubikey-dev
```

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

- pacman (92%):

```sh
sudo pacman -S yubico-c
```

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

- zypper (92%):

```sh
sudo zypper install libyubikey-devel
```

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

## 软件包事实

- **软件包键:** brew:libyubikey
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/libyubikey>
- **版本:** 1.13
- **来源摘要:** C library for manipulating Yubico one-time passwords
- **主页:** <https://yubico.github.io/yubico-c/>
- **上游文档:** <https://yubico.github.io/yubico-c/>
- **许可证:** BSD-2-Clause
- **源码归档:** <https://developers.yubico.com/yubico-c/Releases/libyubikey-1.13.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- modhex (cli)
- ykgenerate (cli)
- ykparse (cli)
- modhex (别名)
- ykgenerate (别名)
- ykparse (别名)

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.13
- 本地数据: OK
- 上游仓库: https://yubico.github.io/yubico-c/
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

libyubikey is the C library inside Yubico yubico-c for low-level YubiKey one-time-password work: modhex conversion, OTP parsing, and OTP generation around the original Yubico authentication model.

### 项目历史

Yubico was founded in Stockholm in 2007 and launched YubiKey 1.0 in 2008 as a driverless one-touch OTP authenticator that identifies as a keyboard. yubico-c followed as the low-level C software development kit for the YubiKey authentication device.

The yubico-c repository describes the command-line tools that expose the library concepts: modhex converts between modhex, hex, and binary forms; ykparse decrypts and parses one OTP with the corresponding AES key; ykgenerate constructs and encrypts one OTP from key and internal token data.

### 采用历史

libyubikey belongs to the pre-FIDO YubiKey software stack, when OTP validation and provisioning were central to deploying hardware authentication. As Yubico and Google moved U2F into the FIDO Alliance in 2013 and browsers and services adopted FIDO U2F from 2014 onward, libyubikey remained relevant for legacy OTP integrations and tooling rather than newer WebAuthn flows.

Yubico announced end-of-life for yubico-c on February 19, 2025, with end-of-life scheduled for February 19, 2026. That makes the package historically important as part of the original YubiKey OTP era, even where newer Yubico libraries cover PIV, FIDO, OATH, or platform-specific use cases.

### 使用方式

Packagers expose libyubikey as a small C library plus tools for modhex and YubiKey OTP token work. It is most useful for test vectors, provisioning scripts, compatibility tooling, and software that needs to parse or generate Yubico OTP values without pulling in higher-level device-management stacks.

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

For package nerds, libyubikey is a tiny security package with a lot of context packed into it: custom alphabets, AES-backed OTP fields, hardware-token history, man pages, Autotools, and a clear line from early two-factor authentication to later FIDO/WebAuthn ecosystems.

### 时间线

- 2007: Yubico was founded in Stockholm and developed a YubiKey 1.0 prototype.
- 2008: YubiKey 1.0 was launched.
- 2010: Yubico added OATH one-time-password support to the YubiKey product line.
- 2013: Yubico and Google contributed U2F technical specifications to the FIDO Alliance.
- 2025-02-19: Yubico announced end-of-life for yubico-c.
- 2026-02-19: Yubico scheduled yubico-c to reach end-of-life.

### Related projects

- yubico-c is the upstream source package for libyubikey. Related Yubico projects include higher-level YubiKey management and protocol libraries, while U2F, FIDO2, and WebAuthn represent the standards track that superseded many OTP-first deployments.

### 来源

- <https://developers.yubico.com/yubico-c/>
- <https://github.com/Yubico/yubico-c>
- <https://www.yubico.com/why-yubico/yubico-innovation-history/>


## 安全说明

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:** libyubikey
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- Debian apt - libyubikey-dev - 1.13-6: normalized package name match | Debian stable package indexes: libyubikey-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Yubikey OTP library development files | https://developers.yubico.com/yubico-c/
- Debian apt - libyubikey0 - 1.13-6: normalized package name match | Debian stable package indexes: libyubikey0 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Yubikey OTP handling library runtime | https://developers.yubico.com/yubico-c/
- Nix - libyubikey: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libyubikey/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libyubikey-dev - 1.13-6: normalized package name match | Ubuntu 24.04 LTS package indexes: libyubikey-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Yubikey OTP library development files | https://developers.yubico.com/yubico-c/
- Ubuntu apt - libyubikey0 - 1.13-6: normalized package name match | Ubuntu 24.04 LTS package indexes: libyubikey0 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Yubikey OTP handling library runtime | https://developers.yubico.com/yubico-c/
- dnf - libyubikey - 1.13-28.fc45: normalized package name match | Fedora Rawhide package metadata: libyubikey from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | C library for decrypting and parsing Yubikey One-time passwords | http://opensource.yubico.com/yubico-c
- dnf - libyubikey-devel - 1.13-28.fc45: normalized package name match | Fedora Rawhide package metadata: libyubikey-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Development files for libyubikey | http://opensource.yubico.com/yubico-c
- pacman - yubico-c - 1.13-8: normalized package name match | Arch Linux sync databases: yubico-c from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Yubico YubiKey C library | https://github.com/Yubico/yubico-c
- zypper - libyubikey-devel - 1.13-3.31: normalized package name match | openSUSE Tumbleweed package metadata: libyubikey-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Yubico's USB key low-level C library | https://developers.yubico.com/
- zypper - libyubikey-tools - 1.13-3.31: normalized package name match | openSUSE Tumbleweed package metadata: libyubikey-tools from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Tools to support Yubico's USB key low-level C library | https://developers.yubico.com/
- zypper - libyubikey0 - 1.13-3.31: normalized package name match | openSUSE Tumbleweed package metadata: libyubikey0 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Yubico's USB key low-level C library | https://developers.yubico.com/
- MacPorts - libyubikey: normalized package name match | MacPorts ports tree: security/libyubikey/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Security and crypto packages](https://pkg.so/zh-hans/security-crypto-tools/) - Matched security, identity, cryptography, password, signing, or certificate metadata.
- [ykpers](https://pkg.so/zh-hans/brew/ykpers/) - Popular package that depends on this formula.
- [cyrus-sasl](https://pkg.so/zh-hans/brew/cyrus-sasl/) - Shares pkgdb curated category or tags: authentication, cli, library, security.
- [oath-toolkit](https://pkg.so/zh-hans/brew/oath-toolkit/) - Shares pkgdb curated category or tags: authentication, cli, otp, security.
- [totp-cli](https://pkg.so/zh-hans/brew/totp-cli/) - Shares pkgdb curated category or tags: authentication, cli, otp, security.
- [libu2f-server](https://pkg.so/zh-hans/brew/libu2f-server/) - Shares pkgdb curated category or tags: authentication, cli, security, yubico.
- [krb5](https://pkg.so/zh-hans/brew/krb5/) - Shares pkgdb curated category or tags: authentication, cli, security.
- [linux-pam](https://pkg.so/zh-hans/brew/linux-pam/) - Shares pkgdb curated category or tags: authentication, cli, security.
- [libjwt](https://pkg.so/zh-hans/brew/libjwt/) - Shares pkgdb curated category or tags: authentication, cli, security.

## Combined YAML source

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


## 来源

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