# 使用 Homebrew, apk, MacPorts, Nix, apt 安装 jbig2enc

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

## 安装

```sh
sudo av install brew:jbig2enc
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install jbig2enc
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install jbig2enc
```

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

### Linux

- apk (92%):

```sh
sudo apk add jbig2enc
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#jbig2enc
```

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

- Debian apt (92%):

```sh
sudo apt install jbig2
```

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

## 软件包事实

- **软件包键:** brew:jbig2enc
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/jbig2enc>
- **版本:** 0.32
- **来源摘要:** JBIG2 encoder (for monochrome documents)
- **主页:** <https://github.com/agl/jbig2enc>
- **仓库:** <https://github.com/agl/jbig2enc>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/agl/jbig2enc/archive/refs/tags/0.32.tar.gz>
- **最后更新:** 2026-06-19T22:36:09Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- jbig2 (cli)
- jbig2topdf.py (cli)
- jbig2 (别名)
- jbig2topdf.py (别名)

## 依赖

- giflib
- jpeg-turbo
- leptonica
- libpng
- libtiff
- webp

## 构建依赖

- autoconf
- automake
- libtool
- pkgconf

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 0.32
- 管理器更新时间: 2026-06-19
- 本地数据: OK
- 上游仓库: https://github.com/agl/jbig2enc
- 检测到的最新版本: 0.32 (当前)
## 项目历史与用法

jbig2enc is a command-line JBIG2 encoder for monochrome document images. Its README describes JBIG2 as a bi-level image format that can outperform Group 4 fax compression and says the tool can generate JBIG2 streams, fragments for embedding in PDFs, symbol extraction and classification, refinement coding, and multipage document compression.

### 项目历史

The public GitHub repository was created in 2009, and the bundled ChangeLog records releases as early as the 0.21-era work on PDF output and old-book scans. The project grew around Leptonica integration, with repeated releases updating Leptonica compatibility, Windows build support, autotools, CMake, Meson, and the helper script later named jbig2topdf.py.

### 采用历史

Homebrew packages the executable as jbig2enc, while Debian and Ubuntu expose the related command through a jbig2 package name. OCRmyPDF documentation treats a JBIG2 encoder as an optional but recommended component for smaller OCR-produced PDFs, which is one of the main reasons the encoder matters in Unix packaging even though the upstream project is small.

### 使用方式

Typical usage is document-pipeline work: encode scanned bilevel images with jbig2, then use jbig2topdf.py to wrap the JBIG2 output into a PDF. The README also documents standalone .jb2 output and sample commands for multi-image PDF creation.

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

jbig2enc sits at an awkward packaging boundary: it is a tiny specialist encoder, but it unlocks much smaller scanned-document PDFs for tools higher in the stack. Packagers also care about its history because JBIG2 patent concerns long affected distribution decisions, while later releases focused on build-system portability and memory-safety fixes.

### 时间线

- 2009: Public GitHub repository created and version 0.27 recorded with Leptonica 1.58 support.
- 2012: Version 0.28 added autotools support, a Visual C++ solution, version reporting, and PDF DPI fixes.
- 2017: Version 0.29 fixed builds with Leptonica 1.70 and adjusted reference counting.
- 2024: Version 0.30 moved PDF helper support to Python 3, added CMake, standalone .jb2 support, DPI options, and ARM endian fixes.
- 2026: Versions 0.31 and 0.32 added build-system work, CI improvements, argument checks, C++17 requirements, and memory-leak fixes.

### Related projects

- The README names Leptonica as a required imaging library and links related jbig2enc sample and minidjvu projects. In package-manager use it is often encountered through OCRmyPDF and other scanned-document workflows.

### 来源

- <https://formulae.brew.sh/formula/jbig2enc>
- <https://github.com/agl/jbig2enc>
- <https://github.com/agl/jbig2enc/blob/master/ChangeLog>
- <https://github.com/agl/jbig2enc/blob/master/README.md>
- <https://ocrmypdf.readthedocs.io/en/v9.0.0/jbig2.html>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** jbig2enc
- **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 - jbig2 - 0.30-1: normalized package name match | Debian stable package indexes: jbig2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | encoder for JBIG2 - command-line tool | https://github.com/agl/jbig2enc
- Debian apt - libjbig2enc-dev - 0.30-1: normalized package name match | Debian stable package indexes: libjbig2enc-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | encoder for JBIG2 - development headers | https://github.com/agl/jbig2enc
- Debian apt - libjbig2enc0t64 - 0.30-1: normalized package name match | Debian stable package indexes: libjbig2enc0t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | encoder for JBIG2 - libraries | https://github.com/agl/jbig2enc
- Nix - jbig2enc: normalized package name match | nixpkgs package indexes: pkgs/by-name/jb/jbig2enc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - jbig2 - 0.29-2.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: jbig2 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | encoder for JBIG2 - command-line tool | https://github.com/agl/jbig2enc
- Ubuntu apt - libjbig2enc-dev - 0.29-2.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libjbig2enc-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | encoder for JBIG2 - development headers | https://github.com/agl/jbig2enc
- Ubuntu apt - libjbig2enc0t64 - 0.29-2.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libjbig2enc0t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | encoder for JBIG2 - libraries | https://github.com/agl/jbig2enc
- apk - jbig2enc - 0.30-r0: normalized package name match | Alpine Linux edge package indexes: jbig2enc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | JBIG2 Encoder | https://github.com/agl/jbig2enc
- apk - jbig2enc-dev - 0.30-r0: normalized package name match | Alpine Linux edge package indexes: jbig2enc-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | JBIG2 Encoder (development files) | https://github.com/agl/jbig2enc
- apk - jbig2enc-doc - 0.30-r0: normalized package name match | Alpine Linux edge package indexes: jbig2enc-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | JBIG2 Encoder (documentation) | https://github.com/agl/jbig2enc
- apk - jbig2enc-static - 0.30-r0: normalized package name match | Alpine Linux edge package indexes: jbig2enc-static from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | JBIG2 Encoder (static library) | https://github.com/agl/jbig2enc
- MacPorts - jbig2enc: normalized package name match | MacPorts ports tree: graphics/jbig2enc/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.
- [Archive and compression packages](https://pkg.so/zh-hans/archive-compression-tools/) - Matched archive or compression metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [libpng](https://pkg.so/zh-hans/brew/libpng/) - Runtime dependency declared by Homebrew.
- [jpeg-turbo](https://pkg.so/zh-hans/brew/jpeg-turbo/) - Runtime dependency declared by Homebrew.
- [libtiff](https://pkg.so/zh-hans/brew/libtiff/) - Runtime dependency declared by Homebrew.
- [giflib](https://pkg.so/zh-hans/brew/giflib/) - Runtime dependency declared by Homebrew.
- [webp](https://pkg.so/zh-hans/brew/webp/) - Runtime dependency declared by Homebrew.
- [leptonica](https://pkg.so/zh-hans/brew/leptonica/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://pkg.so/zh-hans/brew/pkgconf/) - Build dependency declared by Homebrew.
- [libtool](https://pkg.so/zh-hans/brew/libtool/) - Build dependency declared by Homebrew.
- [autoconf](https://pkg.so/zh-hans/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://pkg.so/zh-hans/brew/automake/) - Build dependency declared by Homebrew.
- [ocrmypdf](https://pkg.so/zh-hans/brew/ocrmypdf/) - Popular package that depends on this formula.
- [jbig2dec](https://pkg.so/zh-hans/brew/jbig2dec/) - Shares pkgdb curated category or tags: cli, image-compression, jbig2, media, monochrome-documents.
- [jpeg-xl](https://pkg.so/zh-hans/brew/jpeg-xl/) - Shares pkgdb curated category or tags: cli, encoder, image-compression, media.
- [guetzli](https://pkg.so/zh-hans/brew/guetzli/) - Shares pkgdb curated category or tags: cli, encoder, image-compression, media.
- [lame](https://pkg.so/zh-hans/brew/lame/) - Shares pkgdb curated category or tags: cli, encoder, media.
- [libheif](https://pkg.so/zh-hans/brew/libheif/) - Shares pkgdb curated category or tags: cli, encoder, media.
- [libavif](https://pkg.so/zh-hans/brew/libavif/) - Shares pkgdb curated category or tags: cli, encoder, media.
- [epsilon](https://pkg.so/zh-hans/brew/epsilon/) - Shares pkgdb curated category or tags: cli, image-compression, media.
- [musepack](https://pkg.so/zh-hans/brew/musepack/) - Shares pkgdb curated category or tags: cli, encoder, media.
- [grokj2k](https://pkg.so/zh-hans/brew/grokj2k/) - Both packages work with overlapping file formats or content types. Shared terms: cli, compression, image, image-compression, jpeg.

## Combined YAML source

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