# Install libpinyin with Homebrew, apk, apt, dnf, Nix, pacman, zypper

Library to deal with pinyin. Version 2.10.3 via Homebrew; verified 2026-04-18.

## Install

```sh
sudo av install brew:libpinyin
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install libpinyin
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add libpinyin
```

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

- Debian apt (92%):

```sh
sudo apt install libpinyin-common-dev
```

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

- dnf (92%):

```sh
sudo dnf install libpinyin
```

  Evidence: Fedora Rawhide package metadata: libpinyin 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#libpinyin
```

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

- pacman (92%):

```sh
sudo pacman -S libpinyin
```

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

- zypper (92%):

```sh
sudo zypper install libpinyin-data
```

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

## Package facts

- **Package key:** brew:libpinyin
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/libpinyin>
- **Version:** 2.10.3
- **Source summary:** Library to deal with pinyin
- **Homepage:** <https://github.com/libpinyin/libpinyin>
- **Repository:** <https://github.com/libpinyin/libpinyin>
- **Upstream docs:** <https://github.com/libpinyin/libpinyin#readme>
- **License:** GPL-3.0-or-later
- **Source archive:** <https://github.com/libpinyin/libpinyin/archive/refs/tags/2.10.3.tar.gz>
- **Last updated:** 2026-04-18T21:51:53-04:00
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- gen_binary_files (cli)
- gen_unigram (cli)
- import_interpolation (cli)
- gen_binary_files (alias)
- gen_unigram (alias)
- import_interpolation (alias)

## Dependencies

- berkeley-db
- gettext
- glib

## Build dependencies

- autoconf
- automake
- libtool
- pkgconf

## Install behavior

- Post-install hook: not defined
- Caveats: The formula will switch DBM to Tkrzw in version 2.12 which may impact user data.
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 2.10.3
- Package-manager updated: 2026-04-18
- Local data: ok
- Upstream repository: https://github.com/libpinyin/libpinyin
- Upstream latest detected: 2.10.3 (current)
## Project history and usage

libpinyin is a library for intelligent sentence-based Chinese pinyin input methods. Its upstream README presents it as the algorithmic core that other input-method frontends can build on.

### Project history

The project lives in the libpinyin GitHub organization and focuses on pinyin processing rather than on a standalone user interface. The repository's public description and README are intentionally short: a library to deal with pinyin and to provide algorithms for sentence-based Chinese input methods.

### Adoption history

Its clearest downstream adoption path is ibus-libpinyin, an IBus engine that provides Chinese Pinyin and ZhuYin input methods based on libpinyin. That split is important for packaging because distributions can package the reusable language engine separately from desktop input-method integration.

### How it is used

Package users usually encounter libpinyin indirectly through desktop input methods. Developers and packagers see its helper programs, including tools for generating binary pinyin data and importing model data.

### Why package nerds care

libpinyin is package-nerd interesting because it is language input infrastructure: small, data-driven, and usually invisible until an input method depends on it. It separates Chinese pinyin algorithms from the IBus frontend.

### Timeline

- 2013: The ibus-libpinyin wiki history shows documented feature work around fuzzy pinyin and correction support.
- 2023: The ibus-libpinyin feature page was updated with pinyin correction, fuzzy pinyin, and ZhuYin-related input behavior.

### Related projects

- ibus-libpinyin is the main related frontend, providing an IBus Chinese Pinyin and ZhuYin input method based on libpinyin.
- IBus is the input-method framework that makes the libpinyin engine available in many Linux desktop sessions.

### Sources

- <https://github.com/libpinyin/ibus-libpinyin>
- <https://github.com/libpinyin/ibus-libpinyin/wiki/ibus-libpinyin-features>
- <https://github.com/libpinyin/libpinyin>
- <https://raw.githubusercontent.com/libpinyin/ibus-libpinyin/main/README>
- <https://raw.githubusercontent.com/libpinyin/libpinyin/main/README>


## Security Notes

library-like package without higher-risk signals.

- **Geiger risk:** green / low
- library-like package without higher-risk signals

## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** libpinyin
- **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 - libpinyin-common-dev - 2.8.1-1: normalized package name match | Debian stable package indexes: libpinyin-common-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library to deal with PinYin / zhuyin - common development files | https://github.com/libpinyin/libpinyin
- Debian apt - libpinyin-data - 2.8.1-1+b2: normalized package name match | Debian stable package indexes: libpinyin-data from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Data for PinYin / zhuyin input method library | https://github.com/libpinyin/libpinyin
- Debian apt - libpinyin-utils - 2.8.1-1+b2: normalized package name match | Debian stable package indexes: libpinyin-utils from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library to deal with PinYin - utilities | https://github.com/libpinyin/libpinyin
- Debian apt - libpinyin15 - 2.8.1-1+b2: normalized package name match | Debian stable package indexes: libpinyin15 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library to deal with PinYin | https://github.com/libpinyin/libpinyin
- Debian apt - libpinyin15-dev - 2.8.1-1+b2: normalized package name match | Debian stable package indexes: libpinyin15-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | library to deal with PinYin - development files | https://github.com/libpinyin/libpinyin
- Debian apt - libzhuyin-dev - 2.8.1-1+b2: normalized package name match | Debian stable package indexes: libzhuyin-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Development files for zhuyin input method library | https://github.com/libpinyin/libpinyin
- Debian apt - libzhuyin15 - 2.8.1-1+b2: normalized package name match | Debian stable package indexes: libzhuyin15 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Zhuyin input method library | https://github.com/libpinyin/libpinyin
- Nix - libpinyin: normalized package name match | nixpkgs package indexes: pkgs/by-name/li/libpinyin/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libpinyin-common-dev - 2.8.1-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: libpinyin-common-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | library to deal with PinYin / zhuyin - common development files | https://github.com/libpinyin/libpinyin
- Ubuntu apt - libpinyin-data - 2.8.1-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: libpinyin-data from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Data for PinYin / zhuyin input method library | https://github.com/libpinyin/libpinyin
- Ubuntu apt - libpinyin-utils - 2.8.1-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: libpinyin-utils from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | library to deal with PinYin - utilities | https://github.com/libpinyin/libpinyin
- Ubuntu apt - libpinyin15 - 2.8.1-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: libpinyin15 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | library to deal with PinYin | https://github.com/libpinyin/libpinyin
- Ubuntu apt - libpinyin15-dev - 2.8.1-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: libpinyin15-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | library to deal with PinYin - development files | https://github.com/libpinyin/libpinyin
- Ubuntu apt - libzhuyin-dev - 2.8.1-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: libzhuyin-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Development files for zhuyin input method library | https://github.com/libpinyin/libpinyin
- Ubuntu apt - libzhuyin15 - 2.8.1-1build3: normalized package name match | Ubuntu 24.04 LTS package indexes: libzhuyin15 from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Zhuyin input method library | https://github.com/libpinyin/libpinyin
- apk - libpinyin - 2.11.91-r0: normalized package name match | Alpine Linux edge package indexes: libpinyin from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Library to deal with pinyin | https://github.com/libpinyin/libpinyin


## 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.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [berkeley-db](https://www.automicvault.com/pkg/brew/berkeley-db/) - Runtime dependency declared by Homebrew.
- [gettext](https://www.automicvault.com/pkg/brew/gettext/) - Runtime dependency declared by Homebrew.
- [glib](https://www.automicvault.com/pkg/brew/glib/) - 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.
- [mawk](https://www.automicvault.com/pkg/brew/mawk/) - Shares av.db curated category or tags: cli, language-runtime, text-processing.
- [objfw](https://www.automicvault.com/pkg/brew/objfw/) - Shares av.db curated category or tags: cli, language-runtime, library.
- [txr](https://www.automicvault.com/pkg/brew/txr/) - Shares av.db curated category or tags: cli, language-runtime, text-processing.
- [abcl](https://www.automicvault.com/pkg/brew/abcl/) - Shares av.db curated category or tags: cli, language-runtime.
- [agda](https://www.automicvault.com/pkg/brew/agda/) - Shares av.db curated category or tags: cli, language-runtime.
- [alda](https://www.automicvault.com/pkg/brew/alda/) - Shares av.db curated category or tags: cli, language-runtime.
- [algol68g](https://www.automicvault.com/pkg/brew/algol68g/) - Shares av.db curated category or tags: cli, language-runtime.
- [ammonite-repl](https://www.automicvault.com/pkg/brew/ammonite-repl/) - Shares av.db curated category or tags: cli, language-runtime.
- [plenv](https://www.automicvault.com/pkg/brew/plenv/) - Local package facts share a topical domain. Shared terms: binary, cli, language, language-runtime, runtime.
- [bic](https://www.automicvault.com/pkg/brew/bic/) - Local package facts share a topical domain. Shared terms: cli, language, language-runtime, runtime.
- [blink](https://www.automicvault.com/pkg/brew/blink/) - Local package facts share a topical domain. Shared terms: cli, language, language-runtime, runtime.

## Combined YAML source

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