# 使用 Homebrew, apk, MacPorts, Nix, zypper, scoop, winget 安装 nfpm

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

## 安装

```sh
sudo av install brew:nfpm
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install nfpm
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install nfpm
```

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

### Linux

- apk (92%):

```sh
sudo apk add nfpm
```

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

- Nix (92%):

```sh
nix profile install nixpkgs#nfpm
```

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

- zypper (92%):

```sh
sudo zypper install nfpm
```

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

### Windows

- Scoop (92%):

```sh
scoop install main/nfpm
```

  证据: Scoop official bucket manifest trees: bucket/nfpm.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id goreleaser.nfpm -e
```

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

## 软件包事实

- **软件包键:** brew:nfpm
- **软件包管理器:** Homebrew
- **软件包管理器页面:** <https://formulae.brew.sh/formula/nfpm>
- **版本:** 2.47.0
- **来源摘要:** Simple deb and rpm packager
- **主页:** <https://nfpm.goreleaser.com/>
- **仓库:** <https://github.com/goreleaser/nfpm>
- **上游文档:** <https://nfpm.goreleaser.com/>
- **许可证:** MIT
- **源码归档:** <https://github.com/goreleaser/nfpm/archive/refs/tags/v2.47.0.tar.gz>
- **最后更新:** 2026-07-26T19:43:15+02:00
- **已生成:** 2026-08-04T22:13:35+00:00

## 可执行文件

- nfpm (cli)
- nfpm (别名)

## 构建依赖

- go

## 安装行为

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

## 版本和新鲜度

- 页面生成时间: 2026-08-04
- 管理器版本: 2.47.0
- 管理器更新时间: 2026-07-26
- 本地数据: OK
- 上游仓库: https://github.com/goreleaser/nfpm
- 检测到的最新版本: v2.47.0 (当前)
## 项目历史与用法

nFPM is a Go-based packaging tool from the GoReleaser ecosystem for producing native Linux packages such as deb, rpm, apk, ipk, Arch Linux packages, Termux debs, and MSIX packages. Its practical niche is release automation: take files and metadata from a build and emit distro-package artifacts without forcing every project to maintain native packaging trees.

### 项目历史

Carlos Becker introduced nFPM in a February 23, 2018 post after working on GoReleaser and finding fpm awkward for that workflow because it depended on Ruby, tar behavior, and external packaging software. The name means "Not FPM"; the project was meant to be simpler, predictable, usable both as a library and as a binary, and implemented with minimal external dependencies.

The GitHub README repeats that origin story in package-nerd terms: fpm was useful, but its Ruby and system-tool dependencies were a pain, so nFPM became a simpler, zero-dependency, low-assumption alternative. The repository also credits fpm as the inspiration rather than pretending to be a wholly new packaging idea.

### 采用历史

nFPM's adoption is tied to GoReleaser rather than to a distro committee. Becker's original post said GoReleaser was about to remove fpm and default to nFPM, and GoReleaser's packaging documentation now exposes nFPM directly under its package/archive pipeline.

The project has grown beyond the original deb/rpm goal. GoReleaser's nFPM documentation lists apk, deb, rpm, Termux deb, Arch Linux, ipk, and MSIX as package formats, which shows how it became a general release-artifact generator for projects that ship binaries across Linux distributions and, later, Windows MSIX.

### 使用方式

Package nerds use nFPM either through GoReleaser's `nfpms` section or as the standalone `nfpm` CLI/Go library. The common flow is to describe package name, files, config files, scripts, dependencies, maintainer metadata, and target formats in YAML, then have CI produce distro-shaped packages next to checksums, archives, Homebrew taps, and container images.

Its value is highest for upstream application projects that want acceptable native packages without becoming Debian, RPM, Alpine, Arch, and OpenWrt packaging specialists. It does not replace distribution-maintained packaging policy; it makes upstream release artifacts boring enough for users to install with familiar package tools.

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

nFPM matters because it sits in the gray zone between tarballs and real distro packages. It gives upstream projects a small, reproducible way to generate packages with maintainer scripts and dependency metadata, while avoiding the heavier machinery of distro-specific packaging repositories.

### 时间线

- 2018-02-23: Carlos Becker published "Creating debs and rpms with Go" and described why nFPM was created.
- 2018: GoReleaser was moving away from fpm toward nFPM for its Linux package pipeline.
- 2026-06-23: GoReleaser's nFPM documentation listed Linux formats plus MSIX and Termux-specific packaging behavior.

### Related projects

- GoReleaser
- fpm
- Debian dpkg
- RPM
- Alpine apk
- Arch Linux pacman

### 来源

- <https://carlosbecker.com/posts/nfpm/>
- <https://formulae.brew.sh/formula/nfpm>
- <https://github.com/goreleaser/nfpm>
- <https://goreleaser.com/customization/package/nfpm/>
- <https://nfpm.goreleaser.com/docs/quick-start/>


## 安全说明

narrow executable package without higher-risk signals.

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


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ./nfpm.yaml
## 源数据库详情

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

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

- Nix - nfpm: normalized package name match | nixpkgs package indexes: pkgs/by-name/nf/nfpm/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- apk - nfpm - 2.47.0-r1: normalized package name match | Alpine Linux edge package indexes: nfpm from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | a simple apk, Deb and RPM packager without external dependencies | https://nfpm.goreleaser.com/
- apk - nfpm-doc - 2.47.0-r1: normalized package name match | Alpine Linux edge package indexes: nfpm-doc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | a simple apk, Deb and RPM packager without external dependencies (documentation) | https://nfpm.goreleaser.com/
- zypper - nfpm - 2.47.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: nfpm from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Simple deb, rpm, apk and arch linux packager written in Go | https://github.com/goreleaser/nfpm
- zypper - nfpm-bash-completion - 2.47.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: nfpm-bash-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Bash Completion for nfpm | https://github.com/goreleaser/nfpm
- zypper - nfpm-fish-completion - 2.47.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: nfpm-fish-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Fish Completion for nfpm | https://github.com/goreleaser/nfpm
- zypper - nfpm-zsh-completion - 2.47.0-1.3: normalized package name match | openSUSE Tumbleweed package metadata: nfpm-zsh-completion from https://download.opensuse.org/tumbleweed/repo/oss/repodata/50b07339cb64c8ed4091bdbabddadc1ff5737b090e478818a195b40d8a3292861a879139b4a3987c31109699fde9fbf4a716367ddf4eef77da75f96e3193d6ed-primary.xml.zst | Zsh Completion for nfpm | https://github.com/goreleaser/nfpm
- MacPorts - nfpm: normalized package name match | MacPorts ports tree: sysutils/nfpm/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/nfpm: normalized package name match | Scoop official bucket manifest trees: bucket/nfpm.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - goreleaser.nfpm: normalized package name match | Windows Package Manager source index: goreleaser.nfpm from https://cdn.winget.microsoft.com/cache/source.msix


## 相关链接

- [Package publisher tools](https://pkg.so/zh-hans/package-publishers/) - Belongs to a package publishing or registry 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.
- [go](https://pkg.so/zh-hans/brew/go/) - Build dependency declared by Homebrew.
- [melange](https://pkg.so/zh-hans/brew/melange/) - Shares pkgdb curated category or tags: apk, cli, developer-tools, packaging.
- [rpmspectool](https://pkg.so/zh-hans/brew/rpmspectool/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging, rpm.
- [create-dmg](https://pkg.so/zh-hans/brew/create-dmg/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [pyinstaller](https://pkg.so/zh-hans/brew/pyinstaller/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [python-build](https://pkg.so/zh-hans/brew/python-build/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [snapcraft](https://pkg.so/zh-hans/brew/snapcraft/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [msitools](https://pkg.so/zh-hans/brew/msitools/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [cargo-bundle](https://pkg.so/zh-hans/brew/cargo-bundle/) - Shares pkgdb curated category or tags: cli, developer-tools, packaging.
- [yeet](https://pkg.so/zh-hans/brew/yeet/) - Local package facts share a topical domain. Shared terms: cli, deb, developer, developer-tools, packaging.

## Combined YAML source

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


## 来源

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