# 使用 Homebrew, apt, dnf, MacPorts, Nix, zypper 安装 gocr

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

## 安装

```sh
sudo av install brew:gocr
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install gocr
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install gocr
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install gocr
```

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

- dnf (92%):

```sh
sudo dnf install gocr
```

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

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

- zypper (92%):

```sh
sudo zypper install gocr
```

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

## 软件包事实

- **软件包键:** brew:gocr
- **软件包管理器:** Homebrew
- **版本:** 0.52
- **来源摘要:** Optical Character Recognition (OCR), converts images back to text
- **主页:** <https://wasd.urz.uni-magdeburg.de/jschulen/ocr/>
- **最后更新:** 2026-06-22T19:58:33+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- gocr (别名)
- gocr.tcl (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

GOCR, also known as JOCR on SourceForge, is a command-line optical character recognition program by Joerg Schulenburg. It converts scanned image files back into text and represents an older Unix-style OCR tool that stayed useful enough to remain packaged across many systems.

### 项目历史

The official GOCR page says Schulenburg started the program, led the SourceForge developer team, and continued maintaining the package at a low time base after 2010. The site explains the dual naming: the program's original and internal name is GOCR, while the SourceForge project used JOCR because the gocr project name was unavailable there.

The SourceForge-era history is visible in the official news stream: 0.3.0 appeared in December 2000, libgocr was made publicly available in April 2001, 0.37 arrived in August 2002, and the 0.40 through 0.49 series carried the project through the 2005 to 2010 period. Later releases 0.50, 0.51, and 0.52 were announced from the maintainer site rather than always being uploaded to SourceForge.

### 采用历史

GOCR's adoption pattern is classic pre-GitHub free software: SourceForge hosting, CVS development, tarball releases, mailing-list support, and downstream packaging. The official download page mentions RPMs, Debian packages, Windows binaries, OS/2 packages, and SourceForge source tarballs.

The batch package metadata lists GOCR in Homebrew, Debian, Fedora, MacPorts, Nix, Arch, Ubuntu, and openSUSE package sets. That broad downstream footprint matters more than upstream velocity: OCR users and scanning frontends kept relying on a small C command-line engine that packagers could build and ship.

### 使用方式

GOCR is used from the command line to read supported image formats and emit text. The official page notes that it can be used with different frontends and can open many image formats, with additional formats handled through external tools such as NetPBM.

The project is best understood as a lightweight OCR engine and utility for scanned text, not a modern machine-learning OCR stack. It is most useful where scriptability, old-format support, and small dependency surfaces matter.

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

Package nerds care about GOCR because it is a living fossil of early SourceForge packaging culture: CVS, tarballs, distro patches, optional graphical frontends, and long-lived formulae. It shows how a quiet C utility can survive for decades because it is easy for distributions to keep carrying.

Its GOCR/JOCR naming split is also a small lesson in package identity: upstream command names, project-hosting names, tarball names, and distro package names do not always line up cleanly.

### 时间线

- 2000-06: SourceForge hosting began for the JOCR project, according to the official page.
- 2000-12: GOCR 0.3.0 announced.
- 2001-04: libgocr public beta announced.
- 2005-03: GOCR 0.40 released.
- 2010-09: GOCR 0.49 released.
- 2013-03: GOCR 0.50 released.
- 2017-08: GOCR 0.51 released.
- 2018-10: GOCR 0.52 released.

### Related projects

- libgocr was the related API/library effort documented on the official site.
- NetPBM is an important companion dependency for broader image-format handling.
- Kooka, XSane, and other scanning frontends are adjacent tools that historically used command-line OCR engines.

### 来源

- <https://formulae.brew.sh/api/formula/gocr.json>
- <https://jocr.sourceforge.net/>
- <https://jocr.sourceforge.net/developers.html>
- <https://jocr.sourceforge.net/download.html>
- <https://sourceforge.net/p/jocr/code/>
- <https://sourceforge.net/projects/jocr/rss?path=/gocr>


## 安全说明

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

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

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

- Debian apt - gocr - 0.52-6.1+b1: normalized package name match | Debian stable package indexes: gocr from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Command line OCR | https://www-e.uni-magdeburg.de/jschulen/ocr/
- Debian apt - gocr-tk - 0.52-6.1: normalized package name match | Debian stable package indexes: gocr-tk from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | tcl/tk wrapper around gocr | https://www-e.uni-magdeburg.de/jschulen/ocr/
- Debian apt - libpgm2asc-dev - 0.52-6.1+b1: normalized package name match | Debian stable package indexes: libpgm2asc-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Command line OCR - development files | https://www-e.uni-magdeburg.de/jschulen/ocr/
- Debian apt - libpgm2asc0.52t64 - 0.52-6.1+b1: normalized package name match | Debian stable package indexes: libpgm2asc0.52t64 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Command line OCR - shared library | https://www-e.uni-magdeburg.de/jschulen/ocr/
- Nix - gocr: normalized package name match | nixpkgs package indexes: pkgs/by-name/go/gocr/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - gocr - 0.52-6.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: gocr from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Command line OCR | https://www-e.uni-magdeburg.de/jschulen/ocr/
- Ubuntu apt - gocr-tk - 0.52-6.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: gocr-tk from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | tcl/tk wrapper around gocr | https://www-e.uni-magdeburg.de/jschulen/ocr/
- Ubuntu apt - libpgm2asc-dev - 0.52-6.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libpgm2asc-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Command line OCR - development files | https://www-e.uni-magdeburg.de/jschulen/ocr/
- Ubuntu apt - libpgm2asc0.52t64 - 0.52-6.1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libpgm2asc0.52t64 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Command line OCR - shared library | https://www-e.uni-magdeburg.de/jschulen/ocr/
- dnf - gocr - 0.52-19.fc45: normalized package name match | Fedora Rawhide package metadata: gocr from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/07190dc5ae9f35ae73866675fed6d95fe6e8d9fe22c9d7cdf85862cb2ed24a4c-primary.xml.zst | GNU Optical Character Recognition program | http://jocr.sourceforge.net/
- zypper - gocr - 0.52-3.12: normalized package name match | openSUSE Tumbleweed package metadata: gocr from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Optical Character Recognition Program | https://www-e.uni-magdeburg.de/jschulen/ocr/index.html
- zypper - gocr-gui - 0.52-3.12: normalized package name match | openSUSE Tumbleweed package metadata: gocr-gui from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Optical Character Recognition Program - Basic Graphical Interface | https://www-e.uni-magdeburg.de/jschulen/ocr/index.html
- MacPorts - gocr: normalized package name match | MacPorts ports tree: graphics/gocr/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/gocr.yml](https://github.com/mxcl/pkgdb/blob/main/combined/gocr.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
