Morganamilo/paru · error · Status

Status

Error message

Status: {}

What it means

Status::err wraps a nonzero pacman exit code into the custom Status error type, displayed as 'Status: {n}'. It is how the installer propagates pacman's failure exit status to the top level after a transaction fails.

Solutions

  1. Check earlier output for pacman's actual failure reason (the Status code is only the exit number)
  2. Rerun the operation and answer pacman's prompts, or use --noconfirm consistently
  3. Resolve dependency conflicts or file conflicts pacman reported
  4. Refresh keyrings/mirrors (archlinux-keyring, pacman -Sy) if signature errors preceded the failure
Defensive patterns

Strategy: try-catch

Validate before calling

// resolve obvious conflicts before invoking pacman
// e.g. check for installed conflicting packages first
if !conflicts.is_empty() { eprintln!("resolve conflicts first: {conflicts:?}"); }

Try / catch

match install() {
    Err(e) if e.to_string().starts_with("Status: ") => {
        let code: i32 = e.to_string().split(": ").nth(1).unwrap().parse().unwrap();
        eprintln!("pacman exited with {code}; check preceding pacman output");
    }
    Err(e) => eprintln!("{e}"),
    Ok(_) => {},
}

Prevention

When it happens

Trigger: Calling Status::err(n) with n != 0, which happens in the install flow whenever the child pacman process returns a nonzero exit code (e.g. build_cleanup returns Status::err(ret)).

Common situations: pacman transaction failing because of unresolvable dependencies, package conflicts, failed key checks, or user declining a prompt; build step returning a nonzero code that maps to a pacman-like exit status.

Related errors


AI-assisted analysis of Morganamilo/paru@9ac3578807 (2026-09-12). Data as JSON: /api/errors/56b6ff77f04d987d. Report an issue: GitHub.

Appendix: source

Thrown at src/install.rs:52

use log::debug;
use raur::Cache;
use srcinfo::{ArchVecs, Srcinfo};
use tr::tr;

#[derive(Copy, Clone, Debug)]
pub struct Status(pub i32);

impl std::fmt::Display for Status {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "Status: {}", self.0)
    }
}

impl std::error::Error for Status {}

impl Status {
    pub fn err(n: i32) -> Result<()> {
        bail!(Status(n))
    }
}

struct Installer {
    refresh: usize,
    sysupgrade: usize,
    install_targets: bool,
    done_something: bool,
    ran_pacman: bool,
    upgrades: Upgrades,
    srcinfos: HashMap<String, Srcinfo>,
    remove_make: Vec<String>,
    conflicts: HashSet<String>,
    failed: Vec<Base>,
    chroot: Chroot,
    deps: Vec<String>,
    exp: Vec<String>,
    install_queue: Vec<String>,

View on GitHub (pinned to 9ac3578807)