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

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

## 安装

```sh
sudo av install brew:nkf
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install nkf
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nkf
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install nkf
```

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

- dnf (92%):

```sh
sudo dnf install nkf
```

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

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

- zypper (92%):

```sh
sudo zypper install nkf
```

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

## 软件包事实

- **软件包键:** brew:nkf
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/nkf>
- **版本:** 2.1.5
- **来源摘要:** Network Kanji code conversion Filter (NKF)
- **主页:** <https://github.com/nurse/nkf>
- **仓库:** <https://github.com/nurse/nkf>
- **许可证:** Zlib
- **源码归档:** <https://deb.debian.org/debian/pool/main/n/nkf/nkf_2.1.5.orig.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- nkf (cli)
- nkf (别名)

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.1.5
- 本地数据: OK
- 上游仓库: https://github.com/nurse/nkf
- 信息: No package-manager update timestamp was available.
- 信息: No cached GitHub release or tag data was available.
## 项目历史与用法

nkf, the Network Kanji Filter, is a long-lived Japanese text encoding conversion utility. It converts among encodings such as ISO-2022-JP, Shift_JIS, EUC-JP, UTF-8, UTF-16, and UTF-32, with automatic input-encoding guessing as one of its defining conveniences.

### 项目历史

The upstream README credits the original 1987 Fujitsu work by Itaru Ichikawa and the nkf Project's later maintenance from 1996 through 2012. The project's change log shows a major 2.0-era transition in September 2002, including UTF-8/UTF-16 work and migration into SourceForge CVS, which matches nkf's role as Japanese Unix text processing moved from legacy encodings toward Unicode.

### 采用历史

nkf has survived because the Japanese encoding problem never fully disappeared: archives, mail, old web content, Windows-31J/CP932 data, and legacy build/test fixtures still need reliable conversion. Homebrew's API reported 144 installs in 30 days, 560 in 90 days, and 4,692 in 365 days when checked on July 1, 2026, and the package is also present across Debian/Ubuntu, Fedora, openSUSE, Nix, MacPorts, and other package systems.

### 使用方式

Typical command-line use is plumbing: guess an unknown Japanese file's encoding, convert Shift_JIS or EUC-JP to UTF-8, normalize line endings, MIME-decode Japanese mail headers, or do in-place conversion with `--overwrite`. Developers also encounter nkf indirectly through language bindings, notably Ruby's NKF extension.

### 时间线

- 1987: original nkf copyright is attributed to Fujitsu Ltd. and Itaru Ichikawa.
- 1996-2012: README credits ongoing nkf Project copyright.
- 2002-09: 2.0-era notes record UTF support work and SourceForge CVS setup.
- 2018-12-15: v2.1.5 is the stable version carried by Homebrew.

### Related projects

- Ruby NKF extension
- python-nkf
- iconv

### 来源

- <https://formulae.brew.sh/api/formula/nkf.json>
- <https://github.com/nurse/nkf>
- <https://raw.githubusercontent.com/nurse/nkf/master/Changes>
- <https://raw.githubusercontent.com/nurse/nkf/master/nkf.1>
- <https://ruby-doc.org/core-3.1.2/NKF.html>


## 安全说明

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

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

## 源数据库详情

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** nkf
- **Version Scheme:** 0
- **Revision:** 0
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** stable

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

- Debian apt - libnkf-perl - 1:2.1.5-1+b8: normalized package name match | Debian stable package indexes: libnkf-perl from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Network Kanji code conversion Filter for Perl | https://osdn.net/projects/nkf/
- Debian apt - nkf - 1:2.1.5-1+b8: normalized package name match | Debian stable package indexes: nkf from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Network Kanji code conversion Filter | https://osdn.net/projects/nkf/
- Nix - nkf: normalized package name match | nixpkgs package indexes: pkgs/by-name/nk/nkf/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - libnkf-perl - 1:2.1.5-1build7: normalized package name match | Ubuntu 24.04 LTS package indexes: libnkf-perl from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Network Kanji code conversion Filter for Perl | https://osdn.net/projects/nkf/
- Ubuntu apt - nkf - 1:2.1.5-1build7: normalized package name match | Ubuntu 24.04 LTS package indexes: nkf from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | Network Kanji code conversion Filter | https://osdn.net/projects/nkf/
- dnf - nkf - 2.1.4-40.fc45: normalized package name match | Fedora Rawhide package metadata: nkf from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | A Kanji code conversion filter | http://nkf.osdn.jp/
- dnf - perl-NKF - 2.1.4-40.fc45: normalized package name match | Fedora Rawhide package metadata: perl-NKF from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Perl extension for Network Kanji Filter | http://nkf.osdn.jp/
- zypper - nkf - 2.1.5-1.37: normalized package name match | openSUSE Tumbleweed package metadata: nkf from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Network Kanji Code Conversion Filter | http://sourceforge.jp/projects/nkf/
- zypper - perl-NKF - 2.1.5-1.37: normalized package name match | openSUSE Tumbleweed package metadata: perl-NKF from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Perl extension for nkf (Network Kanji Filter) | http://sourceforge.jp/projects/nkf/
- MacPorts - nkf: normalized package name match | MacPorts ports tree: textproc/nkf/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://pkg.so/zh-hans/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [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.
- [bsdconv](https://pkg.so/zh-hans/brew/bsdconv/) - Shares pkgdb curated category or tags: character-encoding, cli, developer-tools, text-processing.
- [sd](https://pkg.so/zh-hans/brew/sd/) - Shares pkgdb curated category or tags: cli, developer-tools, text-processing.
- [enca](https://pkg.so/zh-hans/brew/enca/) - Shares pkgdb curated category or tags: cli, developer-tools, text-processing.
- [choose-rust](https://pkg.so/zh-hans/brew/choose-rust/) - Shares pkgdb curated category or tags: cli, developer-tools, text-processing.
- [enscript](https://pkg.so/zh-hans/brew/enscript/) - Shares pkgdb curated category or tags: cli, developer-tools, text-processing.
- [recode](https://pkg.so/zh-hans/brew/recode/) - Shares pkgdb curated category or tags: character-encoding, cli, developer-tools, text-processing.
- [rpl](https://pkg.so/zh-hans/brew/rpl/) - Shares pkgdb curated category or tags: cli, developer-tools, text-processing.
- [cmigemo](https://pkg.so/zh-hans/brew/cmigemo/) - Shares pkgdb curated category or tags: cli, developer-tools, text-processing.
- [cconv](https://pkg.so/zh-hans/brew/cconv/) - Local package facts share a topical domain. Shared terms: character, cli, conversion, developer, developer-tools.

## Combined YAML source

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