# 使用 Homebrew, chocolatey, MacPorts, Nix 安装 pmd

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

## 安装

```sh
sudo av install brew:pmd
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install pmd
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install pmd
```

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

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#pmd
```

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

### Windows

- Chocolatey (92%):

```sh
choco install pmd
```

  证据: Chocolatey community package catalog: pmd from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','pester'

## 软件包事实

- **软件包键:** brew:pmd
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/pmd>
- **版本:** 7.26.0
- **来源摘要:** Source code analyzer for Java, JavaScript, and more
- **主页:** <https://pmd.github.io>
- **仓库:** <https://github.com/pmd/pmd>
- **上游文档:** <https://pmd.github.io>
- **许可证:** BSD-4-Clause
- **源码归档:** <https://github.com/pmd/pmd/releases/download/pmd_releases%2F7.26.0/pmd-dist-7.26.0-bin.zip>
- **最后更新:** 2026-06-29T11:30:12Z
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- pmd (cli)
- pmd (别名)

## 依赖

- openjdk

## 安装行为

- post-install 钩子: 未定义
- Bottle: 可用 于 all

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 7.26.0
- 管理器更新时间: 2026-06-29
- 本地数据: OK
- 上游仓库: https://github.com/pmd/pmd
- 信息: No cached GitHub release or tag data was available.

## 安全说明

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:** pmd
- **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

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

- Nix - pmd: normalized package name match | nixpkgs package indexes: pkgs/by-name/pm/pmd/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- MacPorts - pmd: normalized package name match | MacPorts ports tree: java/pmd/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - pmd: normalized package name match | Chocolatey community package catalog: pmd from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','pester'


## 相关链接

- [Source-control packages](https://pkg.so/zh-hans/source-control-tools/) - Belongs to a source-control command family.
- [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.
- [openjdk](https://pkg.so/zh-hans/brew/openjdk/) - Runtime dependency declared by Homebrew.
- [eslint](https://pkg.so/zh-hans/brew/eslint/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, javascript, linter.
- [pylint](https://pkg.so/zh-hans/brew/pylint/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.
- [checkstyle](https://pkg.so/zh-hans/brew/checkstyle/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, java, static-analysis.
- [luacheck](https://pkg.so/zh-hans/brew/luacheck/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.
- [selene](https://pkg.so/zh-hans/brew/selene/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.
- [revive](https://pkg.so/zh-hans/brew/revive/) - Shares pkgdb curated category or tags: cli, code-quality, developer-tools, linter, static-analysis.
- [ktlint](https://pkg.so/zh-hans/brew/ktlint/) - Shares pkgdb curated category or tags: cli, developer-tools, linter, static-analysis.
- [kube-linter](https://pkg.so/zh-hans/brew/kube-linter/) - Shares pkgdb curated category or tags: cli, developer-tools, linter, static-analysis.
- [spotbugs](https://pkg.so/zh-hans/brew/spotbugs/) - Both packages touch the same language runtime or ecosystem. Shared terms: analysis, cli, code, code-quality, developer.

## Combined YAML source

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


## 来源

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