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

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

## 安装

```sh
sudo av install brew:wdiff
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install wdiff
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install wdiff
```

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

### Linux

- Debian apt (92%):

```sh
sudo apt install wdiff
```

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

- dnf (92%):

```sh
sudo dnf install wdiff
```

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

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

- pacman (92%):

```sh
sudo pacman -S wdiff
```

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

- zypper (92%):

```sh
sudo zypper install wdiff
```

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

## 软件包事实

- **软件包键:** brew:wdiff
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/wdiff>
- **版本:** 1.2.2
- **来源摘要:** Display word differences between text files
- **主页:** <https://www.gnu.org/software/wdiff/>
- **上游文档:** <https://www.gnu.org/software/wdiff/>
- **许可证:** GPL-3.0-or-later
- **源码归档:** <https://ftpmirror.gnu.org/gnu/wdiff/wdiff-1.2.2.tar.gz>
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- mdiff (cli)
- unify (cli)
- wdiff (cli)
- wdiff2 (cli)
- mdiff (别名)
- unify (别名)
- wdiff (别名)
- wdiff2 (别名)

## 依赖

- gettext

## 构建依赖

- texinfo

## macOS 提供的库

- ncurses

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 arm64_big_sur, arm64_linux, arm64_monterey, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, big_sur, catalina, monterey, sonoma, ventura

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 1.2.2
- 本地数据: OK
- 上游仓库: https://www.gnu.org/software/wdiff/
- 信息: No package-manager update timestamp was available.
- 信息: Release/tag comparison is only available for GitHub repositories.
## 项目历史与用法

GNU wdiff is a word-oriented front end to diff. Instead of showing line-level changes, it tokenizes text into words, compares the temporary word-per-line forms with diff, and then reconstructs output that highlights word additions and deletions in the original text.

Its niche is prose and documentation review: it is useful when paragraphs have been reflowed or wrapped differently and a normal line diff would make a small wording change look like a large block replacement.

### 项目历史

The GNU wdiff NEWS file records the first public release, version 0.00, in August 1992 by Francois Pinard. Pinard continued the early series through version 0.5 in November 1994, adding behavior such as case-insensitive comparison and standard-input handling.

In June 2007, Denver Gingerich released 0.5.4 and integrated changes from Pinard's 0.5g work from November 1998, including internationalized program messages and short manual pages for related tools. Martin von Gagern then revived the package with version 0.6.0 in March 2010, described by GNU as the first official release in a long time, and moved development from CVS to Bazaar.

The package reached version 1.0.0 in September 2011, with the version bump explicitly marking maturity. Later releases improved translations, Unicode and pager behavior, gnulib integration, and build-system maintenance. GNU lists version 1.2.2 from April 2014 as a release by Martin von Gagern and names him as the current maintainer on the project page.

### 使用方式

The basic command compares an old file and a new file and prints an annotated copy of the new file. The default markers can be replaced with custom strings, terminal highlighting, less-compatible highlighting, LaTeX or troff markup, or ANSI color sequences.

wdiff can also consume a unified diff with the -d option, which makes it a post-processor for version-control output. Its companion tools include mdiff for multi-difference or cluster-oriented comparison, unify for converting context diffs and unified diffs, and wdiff2 as an experimental successor using mdiff as its backend.

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

wdiff is one of the small GNU text-processing tools that fills a gap left by line-based diff. It is not a version-control system feature or a rich review UI; it is a composable filter that can be piped into pagers, formatters, sed scripts, or documentation workflows.

For package-history purposes, it is also a neat example of GNU maintenance continuity: an early-1990s utility by Francois Pinard, revived and modernized in the 2010s with gnulib, gettext, autotools, translation updates, and Bazaar-hosted development.

### 时间线

- 1992-08: wdiff 0.00 is released by Francois Pinard.
- 1994-11: wdiff 0.5 is released, still in the Pinard-led early series.
- 2007-06: wdiff 0.5.4 integrates older 0.5g-era work and adds packaging/documentation improvements.
- 2010-03: wdiff 0.6.0 becomes the first official release in a long time and switches source control from CVS to Bazaar.
- 2011-09: wdiff 1.0.0 is released to reflect package maturity.
- 2014-04: wdiff 1.2.2 updates translations, gnulib, and autotools.

### Related projects

- wdiff builds on GNU diffutils diff and is distributed in the GNU ecosystem alongside tools such as gettext, gnulib, and other command-line text processors. Its own manual also documents mdiff, unify, and wdiff2.

### 来源

- <https://github.com/jwilk-mirrors/wdiff/blob/trunk/NEWS>
- <https://www.gnu.org/software/wdiff/>
- <https://www.gnu.org/software/wdiff/manual/wdiff.html>


## 安全说明

narrow executable package without higher-risk signals.

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

## 源数据库详情

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

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

- Debian apt - wdiff - 1.2.2-9: normalized package name match | Debian stable package indexes: wdiff from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Compares two files word by word | https://www.gnu.org/software/wdiff/
- Debian apt - wdiff-doc - 1.2.2-9: normalized package name match | Debian stable package indexes: wdiff-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Documentation for GNU wdiff | https://www.gnu.org/software/wdiff/
- Nix - wdiff: normalized package name match | nixpkgs package indexes: pkgs/by-name/wd/wdiff/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - wdiff - 1.2.2-6build1: normalized package name match | Ubuntu 24.04 LTS package indexes: wdiff from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Compares two files word by word | https://www.gnu.org/software/wdiff/
- Ubuntu apt - wdiff-doc - 1.2.2-6build1: normalized package name match | Ubuntu 24.04 LTS package indexes: wdiff-doc from https://archive.ubuntu.com/ubuntu/dists/noble/main/binary-amd64/Packages.gz | Documentation for GNU wdiff | https://www.gnu.org/software/wdiff/
- dnf - wdiff - 1.2.2-59.fc45: normalized package name match | Fedora Rawhide package metadata: wdiff from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/210a2053c8e007daf9ae39c2a21daaed9b2ddd07d63ecffa597050361e73650c-primary.xml.zst | Compare files on a word per word basis | https://www.gnu.org/software/wdiff/
- pacman - wdiff - 1.2.2-5: normalized package name match | Arch Linux sync databases: wdiff from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | A wordwise implementation of GNU diff | https://www.gnu.org/software/wdiff/
- zypper - wdiff - 1.2.2-9.7: normalized package name match | openSUSE Tumbleweed package metadata: wdiff from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Display Word Differences Between Text Files | https://www.gnu.org/software/wdiff/
- zypper - wdiff-lang - 1.2.2-9.7: normalized package name match | openSUSE Tumbleweed package metadata: wdiff-lang from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Translations for package wdiff | https://www.gnu.org/software/wdiff/
- MacPorts - wdiff: normalized package name match | MacPorts ports tree: textproc/wdiff/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Nix - unify: installed executable or alias match | nixpkgs package indexes: unify from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix


## 相关链接

- [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.
- [gettext](https://pkg.so/zh-hans/brew/gettext/) - Runtime dependency declared by Homebrew.
- [texinfo](https://pkg.so/zh-hans/brew/texinfo/) - Build dependency declared by Homebrew.
- [pkgdiff](https://pkg.so/zh-hans/brew/pkgdiff/) - Popular package that depends on this formula.
- [diffutils](https://pkg.so/zh-hans/brew/diffutils/) - Shares pkgdb curated category or tags: cli, developer-tools, diff, gnu, text-processing.
- [m4](https://pkg.so/zh-hans/brew/m4/) - Shares pkgdb curated category or tags: cli, developer-tools, gnu, text-processing.
- [grep](https://pkg.so/zh-hans/brew/grep/) - Shares pkgdb curated category or tags: cli, developer-tools, gnu, text-processing.
- [gawk](https://pkg.so/zh-hans/brew/gawk/) - Shares pkgdb curated category or tags: cli, developer-tools, gnu, text-processing.
- [gpatch](https://pkg.so/zh-hans/brew/gpatch/) - Shares pkgdb curated category or tags: cli, developer-tools, diff, gnu.
- [enscript](https://pkg.so/zh-hans/brew/enscript/) - Shares pkgdb curated category or tags: cli, developer-tools, gnu, text-processing.
- [dwdiff](https://pkg.so/zh-hans/brew/dwdiff/) - Shares pkgdb curated category or tags: cli, developer-tools, diff, text-processing.

## Combined YAML source

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