# 使用 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
- **版本:** 0.32
- **来源摘要:** JBIG2 encoder (for monochrome documents)
- **主页:** <https://github.com/agl/jbig2enc>
- **仓库:** <https://github.com/agl/jbig2enc>
- **最后更新:** 2026-06-19T22:36:09Z
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

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

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 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

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

- 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


## 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
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
