Morganamilo/paru · error
packages failed to build
Error message
packages failed to build: {} What it means
After the build phase, build_cleanup checks the installer's failed list; if any packages failed to build, it aggregates their names and bails with "packages failed to build: <names>". This is the summary error reported when one or more AUR builds did not produce packages.
Solutions
- Read each failed package's earlier build log to find the concrete makepkg error
- Rebuild the failing package individually with --rebuild to see full output
- Update the AUR package (or wait for the maintainer) if the PKGBUILD is outdated
- Remove stale build directories in the cache and retry the failed subset
Defensive patterns
Strategy: fallback
Validate before calling
// build packages one at a time so one failure doesn't abort the batch
for pkg in targets {
if let Err(e) = build_single(&pkg) { eprintln!("skipping {pkg}: {e}"); }
} Try / catch
match resolve_targets() {
Err(e) if e.to_string().starts_with("packages failed to build:") => {
let failed: Vec<&str> = e.to_string().rsplit(": ").next().unwrap().split(" ").collect();
eprintln!("retry individually: {failed:?}");
}
other => other?,
} Prevention
- Use --rebuild on individual failures to capture full build logs
- Keep makedepends installed and the base toolchain updated
- Watch for checksum mismatches after upstream releases and update PKGBUILDs
- Clean stale build directories in the cache before retrying
When it happens
Trigger: resolve_targets → build_cleanup with self.failed non-empty: any package whose makepkg build raised an error (compile failure, missing dependency, checksum mismatch) is collected into the failed list.
Common situations: Upstream source changed so checksums no longer match; compiler errors on current toolchain; missing makedepends; out-of-date PKGBUILD after an Arch update; building many packages where one fails and aborts the batch.
Understand the failure class
Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.
Related errors
- {pacman exit code}
- package list does not match srcinfo
- can't build , deps not satisfied
- duplicate PKGBUILD
- {}: {}: {}
AI-assisted analysis of Morganamilo/paru@9ac3578807 (2026-09-12).
Data as JSON: /api/errors/e4ff7b1e13566209.
Report an issue: GitHub.
Appendix: source
Thrown at src/install.rs:451
.unwrap()
.path
.clone(),
};
if let Err(err) = clean_untracked(config, &path) {
print_error(config.color.error, err);
ret = 1;
}
}
}
if !self.failed.is_empty() {
let failed = self
.failed
.iter()
.map(|f| f.to_string())
.collect::<Vec<_>>();
bail!(tr!("packages failed to build: {}", failed.join(" ")));
}
if ret != 0 {
Status::err(ret)
} else {
Ok(())
}
}
fn debug_paths(
&mut self,
config: &Config,
base: &mut Base,
pkgdest: &HashMap<String, String>,
) -> Result<HashMap<String, String>> {
let mut debug_paths = HashMap::new();
if config.install_debug {View on GitHub (pinned to 9ac3578807)