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

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

## 安装

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

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install leptonica
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install leptonica
```

  证据: 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
```

  证据: 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
```

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

  证据: 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
```

  证据: 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
```

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

## 软件包事实

- **软件包键:** brew:leptonica
- **软件包管理器:** Homebrew
- **版本:** 1.87.0
- **来源摘要:** Image processing and image analysis library
- **主页:** <http://www.leptonica.org/>
- **仓库:** <https://github.com/DanBloomberg/leptonica>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- convertfilestopdf (别名)
- convertfilestops (别名)
- convertformat (别名)
- convertsegfilestopdf (别名)
- convertsegfilestops (别名)
- converttopdf (别名)
- converttops (别名)
- fileinfo (别名)
- imagetops (别名)
- xtractprotos (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

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.

### 项目历史

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.

### 采用历史

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.

### 使用方式

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.

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

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.

### 时间线

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

### 来源

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


## 安全说明

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

- **Geiger 风险:** blue / 中
- broad file, network, media, or database tool signal

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

- 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-5.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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | C library for efficient image processing and image analysis operations | https://github.com/danbloomberg/leptonica
- dnf - leptonica-devel - 1.87.0-5.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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Development files for leptonica | https://github.com/danbloomberg/leptonica
- dnf - leptonica-tools - 1.87.0-5.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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | Leptonica utility tools | https://github.com/danbloomberg/leptonica
- dnf - mingw32-leptonica - 1.87.0-5.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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | MinGW Windows Leptonica library | https://github.com/danbloomberg/leptonica
- dnf - mingw64-leptonica - 1.87.0-5.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/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-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.6: normalized package name match | openSUSE Tumbleweed package metadata: leptonica-devel from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Leptonica Development Files | http://leptonica.org/
- zypper - leptonica-tools - 1.87.0-1.6: normalized package name match | openSUSE Tumbleweed package metadata: leptonica-tools from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Leptonica tools | http://leptonica.org/
- zypper - libleptonica6 - 1.87.0-1.6: normalized package name match | openSUSE Tumbleweed package metadata: libleptonica6 from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-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


## Combined YAML source

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