Morganamilo/paru · error
{}
Error message
{} What it means
check_actions accumulates error text (e.g. missing dependency messages rendered above with the failing dep and the dependency stack) into `err`; if any errors were recorded, it bails with `bail!("{}", err)`, surfacing the pre-formatted message verbatim. The `{}` message is a passthrough wrapper, so the real diagnosis is in the lines printed before the bail (e.g. 'missing dependency' chains).
Solutions
- Read the detailed lines printed above the bail: they name the missing dep and its stack
- Search AUR/repos for the missing dependency and install it explicitly first
- Check for typos in PKGBUILD depends= entries if you maintain the package
- Use `paru -Sua` / refresh with -Sy to ensure the dep wasn't renamed or moved
Example fix
// before: unresolved dep blocks install $ paru -S foo error: missing dependency 'bar' (stack: foo -> bar) // after: resolve dep explicitly first $ paru -S bar && paru -S foo
Defensive patterns
Strategy: try-catch
Validate before calling
// pre-check deps
for dep in pkg.depends() {
if !is_available(dep) { eprintln!("missing dep: {dep}"); exit(1); }
} Try / catch
match install::install(config).await {
Err(e) if e.to_string().contains("missing dependency") => {
eprintln!("resolve the listed dependency stack first: {e}");
}
r => r?,
} Prevention
- Refresh databases (-Sy) before resolving AUR deps
- Read the dependency stack lines printed before the error
- Keep AUR helper and package lists current to catch renames early
When it happens
Trigger: check_actions (called from prepare_build) detects problems such as missing dependencies of the transaction; the `err` buffer is non-empty and the function aborts the whole operation with that text.
Common situations: Installing an AUR package whose dependency cannot be resolved (dep not in repos or AUR); dependency stacks where an AUR dep depends on another missing package; typo'd dependency names in PKGBUILDs.
Related errors
- no targets specified (use -h for help)
- --downloadonly can't be used for AUR packages
- repository " " was not found
- no local repo named
- no local repos configured, add one to your pacman.conf: …
AI-assisted analysis of Morganamilo/paru@9ac3578807 (2026-09-12).
Data as JSON: /api/errors/d45ab214faf260ec.
Report an issue: GitHub.
Appendix: source
Thrown at src/install.rs:1372
for missing in &actions.missing {
if missing.stack.is_empty() {
write!(err, "\n {} (target)", c.error.paint(&missing.dep))?;
} else {
let stack = missing
.stack
.iter()
.map(fmt_stack)
.collect::<Vec<_>>()
.join(" -> ");
err.push_str(&tr!(
"\n {missing} (wanted by: {stack})",
missing = c.error.paint(&missing.dep),
stack = stack
));
};
}
bail!("{}", err);
}
for pkg in &actions.unneeded {
eprintln!(
"{} {}",
c.warning.paint("::"),
tr!("{}-{} is up to date -- skipping", pkg.name, pkg.version)
);
}
let conflicts = if !config.chroot || install_targets {
println!(
"{} {}",
c.action.paint("::"),
c.bold.paint(tr!("Calculating conflicts..."))
);
// Hack to ignore conflicts on -B
// Only ignores conflicts for the last package instead of all targetsView on GitHub (pinned to 9ac3578807)