{"record":{"id":"d45ab214faf260ec","repo":"Morganamilo/paru","slug":"install","errorCode":null,"errorMessage":"{}","messagePattern":"\\{\\}","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/install.rs","lineNumber":1372,"sourceCode":"        for missing in &actions.missing {\n            if missing.stack.is_empty() {\n                write!(err, \"\\n    {} (target)\", c.error.paint(&missing.dep))?;\n            } else {\n                let stack = missing\n                    .stack\n                    .iter()\n                    .map(fmt_stack)\n                    .collect::<Vec<_>>()\n                    .join(\" -> \");\n                err.push_str(&tr!(\n                    \"\\n    {missing} (wanted by: {stack})\",\n                    missing = c.error.paint(&missing.dep),\n                    stack = stack\n                ));\n            };\n        }\n\n        bail!(\"{}\", err);\n    }\n\n    for pkg in &actions.unneeded {\n        eprintln!(\n            \"{} {}\",\n            c.warning.paint(\"::\"),\n            tr!(\"{}-{} is up to date -- skipping\", pkg.name, pkg.version)\n        );\n    }\n\n    let conflicts = if !config.chroot || install_targets {\n        println!(\n            \"{} {}\",\n            c.action.paint(\"::\"),\n            c.bold.paint(tr!(\"Calculating conflicts...\"))\n        );\n        // Hack to ignore conflicts on -B\n        // Only ignores conflicts for the last package instead of all targets","sourceCodeStart":1354,"sourceCodeEnd":1390,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/install.rs#L1354-L1390","documentation":"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).","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before: unresolved dep blocks install\n$ paru -S foo\nerror: missing dependency 'bar' (stack: foo -> bar)\n// after: resolve dep explicitly first\n$ paru -S bar && paru -S foo","handlingStrategy":"try-catch","validationCode":"// pre-check deps\nfor dep in pkg.depends() {\n    if !is_available(dep) { eprintln!(\"missing dep: {dep}\"); exit(1); }\n}","typeGuard":null,"tryCatchPattern":"match install::install(config).await {\n    Err(e) if e.to_string().contains(\"missing dependency\") => {\n        eprintln!(\"resolve the listed dependency stack first: {e}\");\n    }\n    r => r?,\n}","preventionTips":["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"],"tags":["dependency-resolution","aur","pacman"],"backgroundTag":"dependency-resolution-failed","analyzedSha":"9ac3578807a87858651e81a02586ceb947686e7c","analyzedAt":"2026-09-12T04:57:59.861Z","contentChangedAt":"2026-09-12T04:57:59.861Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}