# 使用 Homebrew, apt, dnf, MacPorts, Nix 安装 mecab

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

## 安装

```sh
sudo av install brew:mecab
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install mecab
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install mecab
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install mecab
```

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

- dnf (92%):

```sh
sudo dnf install mecab
```

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

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

## 软件包事实

- **软件包键:** brew:mecab
- **软件包管理器:** Homebrew
- **版本:** 0.996
- **来源摘要:** Yet another part-of-speech and morphological analyzer
- **主页:** <https://taku910.github.io/mecab/>
- **最后更新:** 2026-08-02T23:54:37-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- mecab (别名)
- mecab-config (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

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

MeCab is a Japanese part-of-speech and morphological analyzer. The official documentation describes it as an open-source engine developed through the Kyoto University Graduate School of Informatics and NTT Communication Science Laboratories joint research unit project.

### 项目历史

MeCab was designed to be independent of language, dictionary, and corpus, using Conditional Random Fields for parameter estimation. Its documentation contrasts this with ChaSen's hidden Markov model and states that MeCab is faster on average than ChaSen, Juman, and KAKASI.

The release history in the official documentation starts with MeCab 0.90 as the initial release on 2006-03-26. Version 0.93 in July 2006 changed the license to a GPL, LGPL, or BSD triple-license model, and later releases added faster dictionary compilation, HMM training support, partial parsing APIs, retraining, and user dictionary cost estimation.

### 采用历史

Official downloads separate the engine from dictionaries such as IPA, Juman, and UniDic, and list bindings for Perl, Ruby, Python, and Java. The input package facts show broad package-manager coverage across Homebrew, Debian, Ubuntu, Fedora, MacPorts, and Nix, reflecting MeCab's long-lived role as infrastructure for Japanese NLP.

### 使用方式

The docs cover direct parsing, wakati output, output-format customization, character-set changes, N-best output, adding words, dictionary format details, unknown-word handling, partial parsing, soft-wakati output, the C/C++ library interface, and script-language bindings. The command-line tools `mecab` and `mecab-config` expose those capabilities to packages and build scripts.

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

MeCab is a classic package-manager NLP dependency: small native engine, separate dictionaries, command-line interface, C/C++ library, and bindings. It is especially important because many downstream Japanese text tools depend on the stable `mecab` executable and dictionary layout rather than embedding an analyzer.

### 时间线

- 2006: MeCab 0.90 initial release.
- 2006: MeCab 0.93 changes licensing to GPL, LGPL, or BSD.
- 2012: MeCab 0.994 adds retraining and automatic user-dictionary cost estimation.
- 2013: MeCab 0.996 fixes iconv linking and adds user-dictionary CSV cost/context generation.

### Related projects

- ChaSen, Juman, KAKASI, IPA dictionary, Juman dictionary, UniDic, mecab-ko.

### 来源

- <https://github.com/taku910/mecab>
- <https://raw.githubusercontent.com/taku910/mecab/master/mecab/doc/index.html>
- <https://taku910.github.io/mecab/>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals

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

- Debian apt - libmecab-dev - 0.996-15.1+b6: normalized package name match | Debian stable package indexes: libmecab-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Header files of Mecab | https://taku910.github.io/mecab/
- Debian apt - libmecab-java - 0.996-15.1: normalized package name match | Debian stable package indexes: libmecab-java from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | mecab binding for Java - java classes | https://taku910.github.io/mecab/
- Debian apt - libmecab-jni - 0.996-15.1+b6: normalized package name match | Debian stable package indexes: libmecab-jni from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | mecab binding for Java - native interface | https://taku910.github.io/mecab/
- Debian apt - libmecab-perl - 0.996-15.1+b6: normalized package name match | Debian stable package indexes: libmecab-perl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Mecab binding for Perl | https://taku910.github.io/mecab/
- Debian apt - libmecab2 - 0.996-15.1+b6: normalized package name match | Debian stable package indexes: libmecab2 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Libraries of Mecab | https://taku910.github.io/mecab/
- Debian apt - mecab - 0.996-15.1+b6: normalized package name match | Debian stable package indexes: mecab from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Japanese morphological analysis system | https://taku910.github.io/mecab/
- Debian apt - mecab-utils - 0.996-15.1+b6: normalized package name match | Debian stable package indexes: mecab-utils from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Support programs of Mecab | https://taku910.github.io/mecab/
- Debian apt - python3-mecab - 0.996-15.1+b6: normalized package name match | Debian stable package indexes: python3-mecab from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Mecab binding for Python3 | https://taku910.github.io/mecab/
- Debian apt - ruby-mecab - 0.996-15.1+b6: normalized package name match | Debian stable package indexes: ruby-mecab from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Mecab binding for Ruby language | https://taku910.github.io/mecab/
- Nix - mecab: normalized package name match | nixpkgs package indexes: pkgs/by-name/me/mecab/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libmecab-dev - 0.996-14ubuntu4: normalized package name match | Ubuntu 24.04 LTS package indexes: libmecab-dev from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Header files of Mecab | https://taku910.github.io/mecab/
- Ubuntu apt - libmecab-java - 0.996-14ubuntu4: normalized package name match | Ubuntu 24.04 LTS package indexes: libmecab-java from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | mecab binding for Java - java classes | https://taku910.github.io/mecab/
- Ubuntu apt - libmecab-jni - 0.996-14ubuntu4: normalized package name match | Ubuntu 24.04 LTS package indexes: libmecab-jni from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | mecab binding for Java - native interface | https://taku910.github.io/mecab/
- Ubuntu apt - libmecab-perl - 0.996-14ubuntu4: normalized package name match | Ubuntu 24.04 LTS package indexes: libmecab-perl from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Mecab binding for Perl | https://taku910.github.io/mecab/
- Ubuntu apt - libmecab2 - 0.996-14ubuntu4: normalized package name match | Ubuntu 24.04 LTS package indexes: libmecab2 from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Libraries of Mecab | https://taku910.github.io/mecab/
- Ubuntu apt - mecab - 0.996-14ubuntu4: normalized package name match | Ubuntu 24.04 LTS package indexes: mecab from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Japanese morphological analysis system | https://taku910.github.io/mecab/


## Combined YAML source

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