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

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

## 安装

```sh
sudo av install brew:libjwt
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install libjwt
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install libjwt
```

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

### Linux

- apk (92%):

```sh
sudo apk add libjwt
```

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

- dnf (92%):

```sh
sudo dnf install libjwt
```

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

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

- Debian apt (92%):

```sh
sudo apt install libjwt-dev
```

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

- zypper (92%):

```sh
sudo zypper install libjwt-devel
```

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

## 软件包事实

- **软件包键:** brew:libjwt
- **软件包管理器:** Homebrew
- **版本:** 3.6.1
- **来源摘要:** JSON Web Token C library
- **主页:** <https://libjwt.io/>
- **仓库:** <https://github.com/benmcollins/libjwt>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- jwe-decrypt (别名)
- jwe-encrypt (别名)
- jwk2key (别名)
- jwt-generate (别名)
- jwt-verify (别名)
- key2jwk (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

LibJWT is a C library for JSON Web Token and adjacent JOSE formats. It gives C programs JWT creation, verification, JWK/JWKS handling, JWS, JWE, and multiple crypto-backend choices without making the application shell out to higher-level language tooling.

### 项目历史

Ben Collins moved the Git repository in May 2015, and the v1.0.0 tag is anchored to that early public history. The project later expanded beyond basic JWT signing and validation into a broader JOSE library surface, including JWS serializations, JWE serializations, JWK thumbprints, remote JWKS caching, DPoP, and application-profile helpers.

The documentation tracks the IETF standards that shaped the library, including RFC 7515 through RFC 7519 for JWS, JWE, JWK, JWA, and JWT, plus later standards such as RFC 7638, RFC 8725, RFC 9068, RFC 9278, and RFC 9449.

### 采用历史

LibJWT is packaged across many Unix-like systems, including Homebrew, Debian, Ubuntu, Fedora, Alpine, MacPorts, Nix, and openSUSE. That distribution spread reflects a common packaging need: C and C-adjacent services need JWT/JWK primitives without embedding a large web framework.

The project also evolved with the crypto-backend landscape. Its README documents OpenSSL, GnuTLS, and MbedTLS support, plus JSON backends through Jansson or json-c, letting distributors choose dependencies that match platform policy.

### 使用方式

Common uses include signing JWTs, verifying tokens against local keys or JWKS keyrings, generating JWKs, handling key rotation through cached remote JWKS, and building tokens for application profiles such as access-token JWTs, DPoP, VAPID, PASSporT, OpenID4VCI, mTLS, and JAdES.

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

LibJWT is interesting to package maintainers because security-sensitive C libraries have unusually sharp dependency and ABI edges. The package exposes choices among crypto libraries, JSON parsers, and optional libcurl support while staying useful as a small shared library and command-line utility bundle.

### 时间线

- 2015-05-19: v1.0.0 tag points at the repository-move commit.
- 2016-11-05: v1.6.1 tag was committed.
- 2020s: Documentation covers JWS, JWE, JWK, JWKS, DPoP, JWT Best Current Practices, and access-token profiles.
- 2026: README documents experimental ML-DSA support tied to FIPS 204 and RFC 9964.

### Related projects

- Related standards and projects include JWT.io, the JOSE RFC family, OpenSSL, GnuTLS, MbedTLS, Jansson, json-c, and libcurl.

### 来源

- <https://datatracker.ietf.org/doc/html/rfc7519>
- <https://formulae.brew.sh/formula/libjwt>
- <https://github.com/benmcollins/libjwt>
- <https://github.com/benmcollins/libjwt/tags>
- <https://libjwt.io/>


## 安全说明

library-like package without higher-risk signals.

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

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

- Debian apt - libjwt-dev - 1.17.2-1: normalized package name match | Debian stable package indexes: libjwt-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | C library to handle JWT (JSON Web Token) - development | https://github.com/benmcollins/libjwt
- Debian apt - libjwt-gnutls-dev - 1.17.2-1: normalized package name match | Debian stable package indexes: libjwt-gnutls-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development files for libjwt - GnuTLS flavour | https://github.com/benmcollins/libjwt
- Debian apt - libjwt-gnutls2 - 1.17.2-1: normalized package name match | Debian stable package indexes: libjwt-gnutls2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | C library to handle JWT (JSON Web Token) - GnuTLS flavour | https://github.com/benmcollins/libjwt
- Debian apt - libjwt2 - 1.17.2-1: normalized package name match | Debian stable package indexes: libjwt2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | C library to handle JWT (JSON Web Token) | https://github.com/benmcollins/libjwt
- Nix - libjwt: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libjwt/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libjwt-dev - 1.17.0-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libjwt-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | C library to handle JWT (JSON Web Token) - development | https://github.com/benmcollins/libjwt
- Ubuntu apt - libjwt-gnutls-dev - 1.17.0-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libjwt-gnutls-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Development files for libjwt - GnuTLS flavour | https://github.com/benmcollins/libjwt
- Ubuntu apt - libjwt-gnutls2 - 1.17.0-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libjwt-gnutls2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | C library to handle JWT (JSON Web Token) - GnuTLS flavour | https://github.com/benmcollins/libjwt
- Ubuntu apt - libjwt2 - 1.17.0-2build2: normalized package name match | Ubuntu 24.04 LTS package indexes: libjwt2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | C library to handle JWT (JSON Web Token) | https://github.com/benmcollins/libjwt
- apk - libjwt - 3.3.3-r0: normalized package name match | Alpine Linux edge package indexes: libjwt from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The C JSON Web Token Library +JWK +JWKS | https://github.com/benmcollins/libjwt
- apk - libjwt-dev - 3.3.3-r0: normalized package name match | Alpine Linux edge package indexes: libjwt-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The C JSON Web Token Library +JWK +JWKS (development files) | https://github.com/benmcollins/libjwt
- apk - libjwt-doc - 3.3.3-r0: normalized package name match | Alpine Linux edge package indexes: libjwt-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The C JSON Web Token Library +JWK +JWKS (documentation) | https://github.com/benmcollins/libjwt
- apk - libjwt-static - 3.3.3-r0: normalized package name match | Alpine Linux edge package indexes: libjwt-static from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | The C JSON Web Token Library +JWK +JWKS (static library) | https://github.com/benmcollins/libjwt
- apk - libjwt-tools - 3.3.3-r0: normalized package name match | Alpine Linux edge package indexes: libjwt-tools from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Tools for JWT and JWK(S) from libjwt | https://github.com/benmcollins/libjwt
- dnf - libjwt - 1.12.1-23.fc45: normalized package name match | Fedora Rawhide package metadata: libjwt from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | A Javascript Web Token library in C | https://github.com/benmcollins/libjwt
- dnf - libjwt-devel - 1.12.1-23.fc45: normalized package name match | Fedora Rawhide package metadata: libjwt-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for libjwt | https://github.com/benmcollins/libjwt


## Combined YAML source

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