# Install jbig2enc with Homebrew, apk, apt, MacPorts, Nix

JBIG2 encoder (for monochrome documents). Version 0.32 via Homebrew; verified 2026-06-19.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install jbig2enc
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install jbig2enc
```

  Evidence: 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
```

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

- Debian apt (92%):

```sh
sudo apt install jbig2
```

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

- Nix (92%):

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

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

## Package facts

- **Package key:** brew:jbig2enc
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/jbig2enc>
- **Version:** 0.32
- **Source summary:** JBIG2 encoder (for monochrome documents)
- **Homepage:** <https://github.com/agl/jbig2enc>
- **Repository:** <https://github.com/agl/jbig2enc>
- **Upstream docs:** <https://github.com/agl/jbig2enc/blob/master/README.md>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/agl/jbig2enc/archive/refs/tags/0.32.tar.gz>
- **Last updated:** 2026-06-19T22:36:09Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- jbig2 (cli)
- jbig2topdf.py (cli)
- jbig2 (alias)
- jbig2topdf.py (alias)

## Dependencies

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

## Build dependencies

- autoconf
- automake
- libtool
- pkgconf

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.32
- Package-manager updated: 2026-06-19
- Local data: ok
- Upstream repository: https://github.com/agl/jbig2enc
- Upstream latest detected: 0.32 (current)
## Project history and usage

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.

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 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.

### Sources

- <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>


## Security Notes

narrow executable package without higher-risk signals.

- **Geiger risk:** green / low
- narrow executable package without higher-risk signals

## Source Database Details

- **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

## Other Package-Manager Records

- 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


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Archive and compression packages](https://www.automicvault.com/pkg/archive-compression-tools/) - Matched archive or compression metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [giflib](https://www.automicvault.com/pkg/brew/giflib/) - Runtime dependency declared by Homebrew.
- [jpeg-turbo](https://www.automicvault.com/pkg/brew/jpeg-turbo/) - Runtime dependency declared by Homebrew.
- [leptonica](https://www.automicvault.com/pkg/brew/leptonica/) - Runtime dependency declared by Homebrew.
- [libpng](https://www.automicvault.com/pkg/brew/libpng/) - Runtime dependency declared by Homebrew.
- [libtiff](https://www.automicvault.com/pkg/brew/libtiff/) - Runtime dependency declared by Homebrew.
- [webp](https://www.automicvault.com/pkg/brew/webp/) - Runtime dependency declared by Homebrew.
- [autoconf](https://www.automicvault.com/pkg/brew/autoconf/) - Build dependency declared by Homebrew.
- [automake](https://www.automicvault.com/pkg/brew/automake/) - Build dependency declared by Homebrew.
- [libtool](https://www.automicvault.com/pkg/brew/libtool/) - Build dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [ocrmypdf](https://www.automicvault.com/pkg/brew/ocrmypdf/) - Popular package that depends on this formula.
- [jbig2dec](https://www.automicvault.com/pkg/brew/jbig2dec/) - Shares av.db curated category or tags: cli, image-compression, image-processing, jbig2, media.
- [epsilon](https://www.automicvault.com/pkg/brew/epsilon/) - Shares av.db curated category or tags: cli, image-compression, image-processing, media.
- [jbigkit](https://www.automicvault.com/pkg/brew/jbigkit/) - Shares av.db curated category or tags: cli, image-compression, image-processing, media.
- [jpeg-archive](https://www.automicvault.com/pkg/brew/jpeg-archive/) - Shares av.db curated category or tags: cli, image-compression, image-processing, media.
- [libheif](https://www.automicvault.com/pkg/brew/libheif/) - Shares av.db curated category or tags: cli, encoder, image-processing, media.
- [minidjvu](https://www.automicvault.com/pkg/brew/minidjvu/) - Shares av.db curated category or tags: cli, image-compression, image-processing, media.
- [babl](https://www.automicvault.com/pkg/brew/babl/) - Shares av.db curated category or tags: cli, image-processing, media.
- [caire](https://www.automicvault.com/pkg/brew/caire/) - Shares av.db curated category or tags: cli, image-processing, media.
- [jp2a](https://www.automicvault.com/pkg/brew/jp2a/) - Both packages work with overlapping file formats or content types. Shared terms: cli, image, image-processing, jpeg, jpeg-turbo.
- [grokj2k](https://www.automicvault.com/pkg/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/automic-vault/db/blob/main/combined/jbig2enc.yml)


## Sources

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