GoReleaser nfpm rpm/deb packaging failed in CI
GoReleaser uses nfpm to build Linux packages (deb, rpm, apk). Packaging fails when a required field like maintainer is missing, or when a requested format needs external tooling that is absent.
What this error means
GoReleaser fails at the nfpm step with "nfpm failed" citing a required field (for example maintainer) or an error building the rpm or deb.
Terminal
⨯ nfpm failed error=first pass: nfpm failed: package maintainer must be providedCommon causes
A required nfpm field is missing
rpm and deb require metadata such as maintainer; nfpm refuses to build without it.
A requested format needs external tooling
Some package features (signing, certain compressions) need tools the runner does not have.
How to fix it
Fill in required package metadata
- Add the required nfpm fields, including
maintainerandformats. - Set
id,package_name, and adescriptionfor the packages. - Re-run so nfpm has everything it needs to build.
.goreleaser.yaml
nfpms:
- maintainer: Acme <dev@acme.example>
description: Acme CLI
formats: [deb, rpm]Install tooling for the requested format
If a format needs external tools, install them on the runner before GoReleaser runs.
Terminal
sudo apt-get update && sudo apt-get install -y rpmHow to prevent it
- Provide all required nfpm metadata in the config.
- Run
goreleaser checkso missing package fields surface early. - Install format-specific tooling in a setup step.
Related guides
GoReleaser "goreleaser check" config validation fails in CIFix "goreleaser check" failures in CI - the config validation step reports deprecated, invalid, or missing fi…
GoReleaser cgo "gcc: not found" build error in CIFix GoReleaser cgo "gcc not found" in CI - a cross-compiled cgo build needs a C toolchain the runner lacks, o…
GoReleaser GPG "signing failed" in CIFix GoReleaser GPG signing failures in CI - the signing key is not imported, or gpg cannot run non-interactiv…