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

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

## 安装

```sh
sudo av install brew:yajl
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install yajl
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install yajl
```

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

### Linux

- apk (92%):

```sh
sudo apk add yajl
```

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

- dnf (92%):

```sh
sudo dnf install yajl
```

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

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

- pacman (92%):

```sh
sudo pacman -S yajl
```

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

- zypper (92%):

```sh
sudo zypper install yajl
```

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

- Debian apt (92%):

```sh
sudo apt install libyajl-dev
```

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

## 软件包事实

- **软件包键:** brew:yajl
- **软件包管理器:** Homebrew
- **版本:** 2.1.0
- **来源摘要:** Yet Another JSON Library
- **主页:** <https://lloyd.github.io/yajl/>
- **仓库:** <https://github.com/lloyd/yajl>
- **最后更新:** 2026-07-10T18:23:41-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- json_reformat (别名)
- json_verify (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

YAJL, Yet Another JSON Library, is a small event-driven JSON parser and generator written in ANSI C. Its historical niche is streaming JSON: parsing incrementally from files, sockets, or filters without forcing callers into one in-memory tree representation.

### 项目历史

Lloyd Hilaiel's README dates the original motivation to July 2007: existing C JSON parsers did not meet his requirements for portability, robustness, useful contextual errors, incremental stream parsing, simplicity, speed, and small size. That origin explains why YAJL is callback-driven and data-representation independent rather than centered on a single DOM-like tree type.

The public GitHub repository was created in December 2008. YAJL 2 later became the main line, while the repository points legacy users to the 1.x branch. The project site publishes generated Doxygen documentation for both v2.1.0 and the previous stable v1.0.12 line.

### 采用历史

YAJL spread because C programs and language bindings needed a permissively licensed JSON parser that could handle large inputs, streaming data, and low-memory environments. The project site explicitly lists sample command-line tools, `json_reformat` and `json_verify`, which made the library visible to users who needed JSON validation or pretty-printing without writing C code.

Its package-manager footprint is typical of infrastructure libraries: many users encounter it indirectly through bindings, older applications, or distribution dependencies, while maintainers care about ABI stability, small binaries, and predictable parser behavior.

### 使用方式

Programmatic users register callbacks for JSON events, feed buffers to the parser, and build whatever in-memory representation their application wants. The generator side emits valid JSON, and the included tools reformat or verify JSON from the shell.

YAJL is especially useful where JSON arrives as a stream or where holding both the textual input and a full parsed tree would waste memory. Its design is less convenient than a high-level JSON object library, but that is the point: it is a parser core and filter substrate.

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

YAJL is package-nerd infrastructure from the early JSON boom: tiny C, callback API, command-line validators, and enough portability to show up across Unix-like distributions. It is a good example of a library whose significance is larger than its own CLI because it sits below many higher-level language bindings and tools.

### 时间线

- 2007-07: The README's original note explains the requirements that led Lloyd Hilaiel to create YAJL.
- 2008-12: The public GitHub repository was created.
- 2014-03: The 2.1.0 tag was committed, matching the version documented on the project site.
- YAJL 2 era: The README identifies YAJL 2 as the main line and keeps the 1.x branch for legacy users.

### Related projects

- YAJL belongs with other C JSON libraries such as jansson and json-c, but differs by emphasizing SAX-style incremental parsing. Bindings such as yajl-ruby expose the same parser to higher-level languages.

### 来源

- <https://api.github.com/repos/lloyd/yajl>
- <https://github.com/lloyd/yajl>
- <https://github.com/lloyd/yajl/blob/master/README>
- <https://lloyd.github.io/yajl/>


## 安全说明

library-like package without higher-risk signals.

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

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

- Debian apt - libyajl-dev - 2.1.0-5+b2: normalized package name match | Debian stable package indexes: libyajl-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Yet Another JSON Library - development files | https://lloyd.github.io/yajl/
- Debian apt - libyajl-doc - 2.1.0-5: normalized package name match | Debian stable package indexes: libyajl-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Yet Another JSON Library - library documentation | https://lloyd.github.io/yajl/
- Debian apt - libyajl2 - 2.1.0-5+b2: normalized package name match | Debian stable package indexes: libyajl2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Yet Another JSON Library | https://lloyd.github.io/yajl/
- Debian apt - yajl-tools - 2.1.0-5+b2: normalized package name match | Debian stable package indexes: yajl-tools from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Yet Another JSON Library - tools | https://lloyd.github.io/yajl/
- Nix - yajl: normalized package name match | nixpkgs package indexes: pkgs/by-name/ya/yajl/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libyajl-dev - 2.1.0-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libyajl-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Yet Another JSON Library - development files | https://lloyd.github.io/yajl/
- Ubuntu apt - libyajl-doc - 2.1.0-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libyajl-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Yet Another JSON Library - library documentation | https://lloyd.github.io/yajl/
- Ubuntu apt - libyajl2 - 2.1.0-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libyajl2 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Yet Another JSON Library | https://lloyd.github.io/yajl/
- Ubuntu apt - yajl-tools - 2.1.0-5build1: normalized package name match | Ubuntu 24.04 LTS package indexes: yajl-tools from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Yet Another JSON Library - tools | https://lloyd.github.io/yajl/
- apk - yajl - 2.1.0-r9: normalized package name match | Alpine Linux edge package indexes: yajl from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Yet Another JSON Library (YAJL) | https://lloyd.github.io/yajl/
- apk - yajl-dev - 2.1.0-r9: normalized package name match | Alpine Linux edge package indexes: yajl-dev from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Yet Another JSON Library (YAJL) (development files) | https://lloyd.github.io/yajl/
- apk - yajl-static - 2.1.0-r9: normalized package name match | Alpine Linux edge package indexes: yajl-static from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | Yet Another JSON Library (YAJL) (static library) | https://lloyd.github.io/yajl/
- apk - yajl-tools - 2.1.0-r9: normalized package name match | Alpine Linux edge package indexes: yajl-tools from https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz | JSON tools based on Yajl | https://lloyd.github.io/yajl/
- dnf - yajl - 2.1.0-41.fc45: normalized package name match | Fedora Rawhide package metadata: yajl from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Yet Another JSON Library (YAJL) | http://lloyd.github.com/yajl/
- dnf - yajl-devel - 2.1.0-41.fc45: normalized package name match | Fedora Rawhide package metadata: yajl-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Libraries, includes, etc to develop with YAJL | http://lloyd.github.com/yajl/
- pacman - yajl - 2.1.0-7: normalized package name match | Arch Linux sync databases: yajl from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Yet Another JSON Library | https://github.com/lloyd/yajl


## Combined YAML source

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