# 使用 Homebrew, apk, apt, dnf, MacPorts, Nix, pacman, zypper, winget 安装 opencc

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

## 安装

```sh
sudo av install brew:opencc
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install opencc
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install opencc
```

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

### Linux

- apk (92%):

```sh
sudo apk add opencc
```

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

- Debian apt (92%):

```sh
sudo apt install opencc
```

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

- dnf (92%):

```sh
sudo dnf install opencc
```

  证据: Fedora Rawhide package metadata: opencc from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst

- Nix (92%):

```sh
nix profile install nixpkgs#opencc
```

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

- pacman (92%):

```sh
sudo pacman -S opencc
```

  证据: Arch Linux sync databases: opencc from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install opencc
```

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

### Windows

- winget (92%):

```sh
winget install --id BYVoid.OpenCC -e
```

  证据: Windows Package Manager source index: BYVoid.OpenCC from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:opencc
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/opencc>
- **版本:** 1.4.1
- **来源摘要:** Simplified-traditional Chinese conversion tool
- **主页:** <https://opencc.byvoid.com/>
- **仓库:** <https://github.com/BYVoid/OpenCC>
- **上游文档:** <https://opencc.byvoid.com/>
- **许可证:** Apache-2.0
- **源码归档:** <https://github.com/BYVoid/OpenCC/archive/refs/tags/ver.1.4.1.tar.gz>
- **最后更新:** 2026-07-12T16:02:42Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- opencc (cli)
- opencc_dict (cli)
- opencc_phrase_extract (cli)
- opencc (别名)
- opencc_dict (别名)
- opencc_phrase_extract (别名)

## 依赖

- marisa

## 构建依赖

- cmake

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.4.1
- 管理器更新时间: 2026-07-12
- 本地数据: OK
- 上游仓库: https://github.com/BYVoid/OpenCC
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

OpenCC, Open Chinese Convert, is a conversion library and CLI for Traditional Chinese, Simplified Chinese, Japanese Shinjitai, regional vocabulary variants, and character/phrase-level Chinese script conversion.

### 项目历史

BYVoid's project page describes OpenCC as an open source Traditional/Simplified Chinese conversion project with high-quality phrase dictionaries and a C library, originally hosted on Google Code and GitHub. The source header credits Carbo Kuo and contributors from 2010 onward, giving the project a long maintenance history for what could otherwise look like a simple text filter.

The project evolved from a C/C++ conversion library and command-line tool into a multi-ecosystem package. The README lists installation paths through Debian, Ubuntu, Fedora, Arch Linux, Homebrew, WinGet, Bazel, Node.js, and Python, and includes C, C++, Node.js, and Python usage examples.

OpenCC's release history shows the project treating dictionaries and conversion behavior as first-class software. Version 1.1.0 introduced the `ocd2` dictionary format based on Marisa Trie and reduced dictionary size; version 1.3.x rewrote core conversion paths, added Jieba plugin work, and expanded diagnostics such as segmentation and inspection; version 1.4.0 raised the C++ ABI/SOVERSION to avoid silent ABI mismatches.

### 采用历史

OpenCC became a common dependency because script conversion is not just character substitution. The project emphasizes distinctions such as one-simplified-to-many-traditional mappings, variant characters, and regional vocabulary across Mainland China, Taiwan, Hong Kong, and Japanese Shinjitai.

The package's breadth across Python, Node.js, WinGet, Linux distributions, Homebrew, and Bazel makes it useful in desktop tools, web backends, NLP preprocessing, publishing pipelines, chat applications, and input-method ecosystems. OpenCC's own documentation states that it is not a Mandarin/Cantonese translation tool, which helps frame its adoption around orthography and vocabulary variants rather than language translation.

### 使用方式

Users run the `opencc` CLI with JSON configurations such as Simplified-to-Traditional, Traditional-to-Simplified, Taiwan phrase, Hong Kong phrase, or Japanese Shinjitai conversion modes. Developers embed the library through C/C++, Python, Node.js, or downstream ports when they need deterministic script conversion inside applications.

Dictionary maintainers and power users use `opencc_dict`, inline dictionaries, JSON/JSONC configuration, resource bundles, and diagnostic modes to inspect segmentation and conversion stages. Those tools matter because many conversion bugs are phrase-boundary or regional-vocabulary bugs rather than simple missing characters.

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

OpenCC is a deceptively deep package: a text converter with ABI, dictionary format, data-resource packaging, language bindings, prebuilt binaries, and region-sensitive data updates. The interesting packaging work is making the executable, shared library, dictionaries, configs, and bindings agree across platforms.

It is also a good example of data as code. Release notes are dominated by dictionary corrections, phrase additions, normalization behavior, and compatibility work, showing why downstreams need both the binary and the exact data files.

### 时间线

- 2010: Source headers credit the beginning of the Carbo Kuo/contributor copyright span.
- 2016: BYVoid's project page documented OpenCC as a Google Code and GitHub-hosted project with a C library and phrase dictionaries.
- 2020-05-10: OpenCC 1.1.0 introduced the `ocd2` dictionary format and smaller Marisa Trie-backed dictionaries.
- 2026-04-17: OpenCC 1.3.0 added experimental Jieba segmentation plugin work.
- 2026-07-01: OpenCC 1.4.0 raised the C++ ABI/SOVERSION to 1.4 and hardened dictionary handling.

### Related projects

- Related packages include OpenCC's Python and Node.js bindings, opencc-js and other ports, Jieba segmentation integrations, Rime/librime input-method uses, and downstream operating-system packages that split OpenCC data, docs, and shared libraries.

### 来源

- <https://byvoid.com/en/project/opencc/>
- <https://github.com/BYVoid/OpenCC>
- <https://opencc.byvoid.com/>
- <https://raw.githubusercontent.com/BYVoid/OpenCC/master/NEWS.md>
- <https://raw.githubusercontent.com/BYVoid/OpenCC/master/src/opencc.h>


## 安全说明

没有找到 opencc 的匹配本地密钥处理 manifest。软件包元数据仍在此发布，以便未来覆盖拥有稳定的软件包 URL。


## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** opencc
- **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

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

- Debian apt - libopencc-data - 1.1.9+ds1-1+deb13u1: normalized package name match | Debian stable package indexes: libopencc-data from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | simplified-traditional Chinese conversion library - data files | https://github.com/BYVoid/OpenCC
- Debian apt - libopencc-dev - 1.1.9+ds1-1+deb13u1: normalized package name match | Debian stable package indexes: libopencc-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | simplified-traditional Chinese conversion library - development | https://github.com/BYVoid/OpenCC
- Debian apt - libopencc-doc - 1.1.9+ds1-1+deb13u1: normalized package name match | Debian stable package indexes: libopencc-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | simplified-traditional Chinese conversion library - document | https://github.com/BYVoid/OpenCC
- Debian apt - libopencc1.1 - 1.1.9+ds1-1+deb13u1: normalized package name match | Debian stable package indexes: libopencc1.1 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | simplified-traditional Chinese conversion library - runtime | https://github.com/BYVoid/OpenCC
- Debian apt - opencc - 1.1.9+ds1-1+deb13u1: normalized package name match | Debian stable package indexes: opencc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | simplified-traditional Chinese conversion tool | https://github.com/BYVoid/OpenCC
- Debian apt - python3-opencc - 1.1.9+ds1-1+deb13u1: normalized package name match | Debian stable package indexes: python3-opencc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | simplified-traditional Chinese conversion library - Python 3.x | https://github.com/BYVoid/OpenCC
- Nix - opencc: normalized package name match | nixpkgs package indexes: pkgs/by-name/op/opencc/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libopencc-data - 1.1.7+ds1-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libopencc-data from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | simplified-traditional Chinese conversion library - data files | https://github.com/BYVoid/OpenCC
- Ubuntu apt - libopencc-dev - 1.1.7+ds1-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libopencc-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | simplified-traditional Chinese conversion library - development | https://github.com/BYVoid/OpenCC
- Ubuntu apt - libopencc-doc - 1.1.7+ds1-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libopencc-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | simplified-traditional Chinese conversion library - document | https://github.com/BYVoid/OpenCC
- Ubuntu apt - libopencc1.1 - 1.1.7+ds1-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: libopencc1.1 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | simplified-traditional Chinese conversion library - runtime | https://github.com/BYVoid/OpenCC
- Ubuntu apt - opencc - 1.1.7+ds1-1build1: normalized package name match | Ubuntu 24.04 LTS package indexes: opencc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | simplified-traditional Chinese conversion tool | https://github.com/BYVoid/OpenCC
- apk - opencc - 1.4.1-r0: normalized package name match | Alpine Linux edge package indexes: opencc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Open Chinese Convert | https://opencc.byvoid.com/
- apk - opencc-dev - 1.4.1-r0: normalized package name match | Alpine Linux edge package indexes: opencc-dev from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Open Chinese Convert (development files) | https://opencc.byvoid.com/
- apk - opencc-doc - 1.4.1-r0: normalized package name match | Alpine Linux edge package indexes: opencc-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Open Chinese Convert (documentation) | https://opencc.byvoid.com/
- apk - opencc-libs - 1.4.1-r0: normalized package name match | Alpine Linux edge package indexes: opencc-libs from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Open Chinese Convert (libraries) | https://opencc.byvoid.com/


## 相关链接

- [Terminal utility packages](https://pkg.so/zh-hans/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://pkg.so/zh-hans/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Developer build packages](https://pkg.so/zh-hans/developer-build-tools/) - Matched build, compiler, generator, or developer workflow metadata.
- [Networking and protocol packages](https://pkg.so/zh-hans/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [marisa](https://pkg.so/zh-hans/brew/marisa/) - Runtime dependency declared by Homebrew.
- [cmake](https://pkg.so/zh-hans/brew/cmake/) - Build dependency declared by Homebrew.
- [librime](https://pkg.so/zh-hans/brew/librime/) - Popular package that depends on this formula.
- [cconv](https://pkg.so/zh-hans/brew/cconv/) - Shares pkgdb curated category or tags: chinese, cli, developer-tools, simplified-chinese, text-processing.
- [dos2unix](https://pkg.so/zh-hans/brew/dos2unix/) - Shares pkgdb curated category or tags: cli, developer-tools, text-conversion, text-processing.
- [recode](https://pkg.so/zh-hans/brew/recode/) - Shares pkgdb curated category or tags: cli, developer-tools, text-conversion, text-processing.
- [scws](https://pkg.so/zh-hans/brew/scws/) - Shares pkgdb curated category or tags: chinese, cli, developer-tools, text-processing.
- [simdutf](https://pkg.so/zh-hans/brew/simdutf/) - Shares pkgdb curated category or tags: cli, developer-tools, text-processing.
- [sd](https://pkg.so/zh-hans/brew/sd/) - Shares pkgdb curated category or tags: cli, developer-tools, text-processing.
- [nkf](https://pkg.so/zh-hans/brew/nkf/) - Shares pkgdb curated category or tags: cli, developer-tools, text-processing.
- [scooter](https://pkg.so/zh-hans/brew/scooter/) - Shares pkgdb curated category or tags: cli, developer-tools, text-processing.

## Combined YAML source

View the package source record on GitHub. [combined/opencc.yml](https://github.com/mxcl/pkgdb/blob/main/combined/opencc.yml)


## 来源

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