# Install leptonica with Homebrew, apk, dnf, MacPorts, Nix, pacman, zypper

Image processing and image analysis library. Version 1.87.0 via Homebrew; verified from local package data.

## Install

```sh
sudo av install brew:leptonica
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install leptonica
```

  Evidence: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install leptonica
```

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

### Linux

- apk (92%):

```sh
sudo apk add leptonica
```

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

- dnf (92%):

```sh
sudo dnf install leptonica
```

  Evidence: Fedora Rawhide package metadata: leptonica from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#leptonica
```

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

- pacman (92%):

```sh
sudo pacman -S leptonica
```

  Evidence: Arch Linux sync databases: leptonica from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install leptonica-devel
```

  Evidence: openSUSE Tumbleweed package metadata: leptonica-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:leptonica
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/leptonica>
- **Version:** 1.87.0
- **Source summary:** Image processing and image analysis library
- **Homepage:** <http://www.leptonica.org/>
- **Repository:** <https://github.com/DanBloomberg/leptonica>
- **Upstream docs:** <https://www.leptonica.org/>
- **License:** BSD-2-Clause
- **Source archive:** <https://github.com/DanBloomberg/leptonica/releases/download/1.87.0/leptonica-1.87.0.tar.gz>
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- convertfilestopdf (cli)
- convertfilestops (cli)
- convertformat (cli)
- convertsegfilestopdf (cli)
- convertsegfilestops (cli)
- converttopdf (cli)
- converttops (cli)
- fileinfo (cli)
- imagetops (cli)
- xtractprotos (cli)
- convertfilestopdf (alias)
- convertfilestops (alias)
- convertformat (alias)
- convertsegfilestopdf (alias)
- convertsegfilestops (alias)
- converttopdf (alias)
- converttops (alias)
- fileinfo (alias)
- imagetops (alias)
- xtractprotos (alias)

## Dependencies

- giflib
- jpeg-turbo
- libpng
- libtiff
- openjpeg
- webp

## Build dependencies

- 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: 1.87.0
- Local data: ok
- Upstream repository: https://github.com/DanBloomberg/leptonica
- info: No package-manager update timestamp was available.
- info: No cached GitHub release or tag data was available.
## Project history and usage

Leptonica is Dan Bloomberg's open source C library for image processing and image analysis, with especially deep coverage of document-image operations used by OCR and page-processing tools.

### Project history

Leptonica's official README metadata dates the work to 2001 and describes it as an open source C library for efficient image processing and image analysis. The project site emphasizes a pedagogical style: the code is accompanied by web pages explaining algorithms and design methods.

The library grew into a broad C toolkit covering raster operations, affine and projective transforms, morphology, convolution, connected components, image format I/O, PDF and PostScript generation, document cleanup, skew detection, dewarping, barcode experiments, and many supporting data structures.

### Adoption history

Leptonica became important infrastructure below OCR and document-image projects. Its README lists Tesseract OCR, OpenCV, and jbig2enc among open source projects that use it.

The project's packaging history reflects a classic C-library role: distributions ship the library, headers, command-line utilities, and example programs so higher-level tools can depend on a stable native image-processing base.

### How it is used

Developers link against liblept and use the pix-centered API for reading, transforming, analyzing, and writing images. The package also includes command-line programs such as file conversion and PDF/PostScript helpers that expose common library workflows.

### Why package nerds care

Leptonica is significant because it is one of those quiet dependency packages that makes OCR stacks work. It is small enough to feel like a C utility library, but large enough to cover thousands of image-processing functions and the boring portability details that downstream packages need.

### Timeline

- 2001: Official metadata identifies Leptonica as an open source C library for image processing and image analysis.
- 2010s: Leptonica moved into GitHub-based maintenance, with contributors preserving old distributions and modernizing build support.
- 2024: Version 1.85.0 added PDF rendering support and many maintenance fixes.
- 2025: Version 1.87.0 was distributed on December 24, 2025.

### Related projects

- Tesseract OCR is a major downstream user.
- OpenCV and jbig2enc are listed by Leptonica as open source projects using the library.

### Sources

- <https://github.com/DanBloomberg/leptonica>
- <https://www.leptonica.org/>
- <https://www.leptonica.org/source/README.html>
- <https://www.leptonica.org/source/version-notes.html>


## Security Notes

broad file, network, media, or database tool signal.

- **Geiger risk:** blue / medium
- broad file, network, media, or database tool signal

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** leptonica
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

## Other Package-Manager Records

- Nix - leptonica: normalized package name match | nixpkgs package indexes: pkgs/by-name/le/leptonica/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - leptonica - 1.87.0-r0: normalized package name match | Alpine Linux edge package indexes: leptonica from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Software that is broadly useful for image processing and image analysis applications | http://www.leptonica.com/
- apk - leptonica-dev - 1.87.0-r0: normalized package name match | Alpine Linux edge package indexes: leptonica-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Software that is broadly useful for image processing and image analysis applications (development files) | http://www.leptonica.com/
- apk - leptonica-doc - 1.87.0-r0: normalized package name match | Alpine Linux edge package indexes: leptonica-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Software that is broadly useful for image processing and image analysis applications (documentation) | http://www.leptonica.com/
- dnf - leptonica - 1.87.0-4.fc45: normalized package name match | Fedora Rawhide package metadata: leptonica from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | C library for efficient image processing and image analysis operations | https://github.com/danbloomberg/leptonica
- dnf - leptonica-devel - 1.87.0-4.fc45: normalized package name match | Fedora Rawhide package metadata: leptonica-devel from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Development files for leptonica | https://github.com/danbloomberg/leptonica
- dnf - leptonica-tools - 1.87.0-4.fc45: normalized package name match | Fedora Rawhide package metadata: leptonica-tools from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | Leptonica utility tools | https://github.com/danbloomberg/leptonica
- dnf - mingw32-leptonica - 1.87.0-4.fc45: normalized package name match | Fedora Rawhide package metadata: mingw32-leptonica from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | MinGW Windows Leptonica library | https://github.com/danbloomberg/leptonica
- dnf - mingw64-leptonica - 1.87.0-4.fc45: normalized package name match | Fedora Rawhide package metadata: mingw64-leptonica from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst | MinGW Windows Leptonica library | https://github.com/danbloomberg/leptonica
- pacman - leptonica - 1.87.0-1: normalized package name match | Arch Linux sync databases: leptonica from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | Software that is broadly useful for image processing and image analysis applications | http://www.leptonica.com
- zypper - leptonica-devel - 1.87.0-1.4: normalized package name match | openSUSE Tumbleweed package metadata: leptonica-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Leptonica Development Files | http://leptonica.org/
- zypper - leptonica-tools - 1.87.0-1.4: normalized package name match | openSUSE Tumbleweed package metadata: leptonica-tools from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Leptonica tools | http://leptonica.org/
- zypper - libleptonica6 - 1.87.0-1.4: normalized package name match | openSUSE Tumbleweed package metadata: libleptonica6 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Library for image processing and image analysis applications | http://leptonica.org/
- MacPorts - leptonica: normalized package name match | MacPorts ports tree: graphics/leptonica/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Nix - fileinfo: installed executable or alias match | nixpkgs package indexes: pkgs/by-name/fi/fileinfo/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [Media and graphics packages](https://www.automicvault.com/pkg/media-graphics-tools/) - Matched media, image, audio, video, or graphics 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.
- [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.
- [openjpeg](https://www.automicvault.com/pkg/brew/openjpeg/) - Runtime dependency declared by Homebrew.
- [webp](https://www.automicvault.com/pkg/brew/webp/) - Runtime dependency declared by Homebrew.
- [pkgconf](https://www.automicvault.com/pkg/brew/pkgconf/) - Build dependency declared by Homebrew.
- [ghostscript](https://www.automicvault.com/pkg/brew/ghostscript/) - Popular package that depends on this formula.
- [jbig2enc](https://www.automicvault.com/pkg/brew/jbig2enc/) - Popular package that depends on this formula.
- [mupdf](https://www.automicvault.com/pkg/brew/mupdf/) - Popular package that depends on this formula.
- [tesseract](https://www.automicvault.com/pkg/brew/tesseract/) - Popular package that depends on this formula.
- [camellia](https://www.automicvault.com/pkg/brew/camellia/) - Shares av.db curated category or tags: c-library, cli, 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.
- [epsilon](https://www.automicvault.com/pkg/brew/epsilon/) - Shares av.db curated category or tags: cli, image-processing, media.
- [exact-image](https://www.automicvault.com/pkg/brew/exact-image/) - Shares av.db curated category or tags: cli, image-processing, media.
- [exiftran](https://www.automicvault.com/pkg/brew/exiftran/) - Shares av.db curated category or tags: cli, image-processing, media.
- [faceprints](https://www.automicvault.com/pkg/brew/faceprints/) - Shares av.db curated category or tags: cli, image-processing, media.
- [gd](https://www.automicvault.com/pkg/brew/gd/) - Shares av.db curated category or tags: cli, image-processing, media.
- [libsail](https://www.automicvault.com/pkg/brew/libsail/) - Both packages work with overlapping file formats or content types. Shared terms: cli, giflib, image, image-processing, jpeg.
- [openimageio](https://www.automicvault.com/pkg/brew/openimageio/) - Both packages work with overlapping file formats or content types. Shared terms: cli, giflib, image, image-processing, jpeg.

## Combined YAML source

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