Morganamilo/paru · error
can not use chroot builds: devtools is not installed
Error message
can not use chroot builds: devtools is not installed
What it means
handle_cmd checks at startup that chroot-based builds are possible: if the operation is ChrootCtl or the --chroot flag is set, the arch-nspawn command (from the devtools package) must exist on PATH. If not, paru bails because chroot builds simply cannot proceed without devtools.
Solutions
- Install devtools: `sudo pacman -S devtools`
- Verify: `command -v arch-nspawn` should print a path
- Drop the --chroot flag / chroot config option if you don't need isolated builds
- Set `Chroot`/chroot options off in paru.conf if it's enabled there unintentionally
Example fix
// before $ paru -S foo --chroot can not use chroot builds: devtools is not installed // after $ sudo pacman -S devtools $ paru -S foo --chroot
Defensive patterns
Strategy: validation
Validate before calling
if using_chroot() && which("arch-nspawn").is_err() {
eprintln!("install devtools before using --chroot");
std::process::exit(1);
} Prevention
- Install devtools (`pacman -S devtools`) on hosts where chroot builds are used
- Disable Chroot in paru.conf if you don't need it
- Verify arch-nspawn is on PATH in minimal images
When it happens
Trigger: Running `paru --chroot ...` / `paru -S <pkg> --chroot` or a chrootctl operation when has_command("arch-nspawn") returns false — i.e. devtools is not installed or arch-nspawn is not on PATH.
Common situations: Users enabling --chroot on a fresh Arch install without devtools; minimal containers; devtools installed but PATH broken (e.g. /usr/bin missing from PATH in weird environments); forgetting that chroot builds require the extra package.
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
AI-assisted analysis of Morganamilo/paru@9ac3578807 (2026-09-12).
Data as JSON: /api/errors/ca6f4d279a08dbf0.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib.rs:206
git_flags: config.git_flags.clone(),
clone_dir: config.build_dir.clone(),
diff_dir: config.cache_dir.join("diff"),
aur_url,
};
let mut fetch = config.fetch.clone();
fetch.clone_dir = config.build_dir.join("repo");
fetch.diff_dir = config.cache_dir.join("diff/repo");
config.pkgbuild_repos.fetch = fetch;
log::debug!("{:#?}", config);
handle_cmd(config).await
}
async fn handle_cmd(config: &mut Config) -> Result<i32> {
if (config.op == Op::ChrootCtl || config.chroot) && !has_command("arch-nspawn") {
bail!(tr!("can not use chroot builds: devtools is not installed"));
}
let ret = match config.op {
Op::Database | Op::Files => exec::pacman(config, &config.args)?.code(),
Op::Upgrade => handle_upgrade(config).await?,
Op::Build => handle_build(config).await?,
Op::Query => handle_query(config).await?,
Op::Sync => handle_sync(config).await?,
Op::Remove => handle_remove(config)?,
Op::DepTest => handle_test(config).await?,
Op::GetPkgBuild => handle_get_pkg_build(config).await?,
Op::Show => handle_show(config).await?,
Op::Default => handle_default(config).await?,
Op::RepoCtl => handle_repo(config)?,
Op::ChrootCtl => handle_chroot(config)?,
// _ => bail!("unknown op '{}'", config.op),
};
View on GitHub (pinned to 9ac3578807)