Morganamilo/paru · error
can not find local repo
Error message
can not find local repo '{}' in pacman.conf What it means
After collecting local AUR repo databases, paru checks that every such repo is registered in the parsed pacman configuration (self.pacman.repos). If a local repo DB exists on disk (e.g. in a CacheDir) but pacman.conf has no matching repository section, paru bails with 'can not find local repo {} in pacman.conf'. pacman must know the repo for paru to use it.
Solutions
- Add the missing repo section to /etc/pacman.conf with a matching name, SigLevel, and Server
- Uncomment the section if it was commented out
- Fix the repo name in pacman.conf to match the .db filename in the CacheDir
- Delete the stale DB file from the CacheDir if the repo is intentionally gone
Example fix
// before (/etc/pacman.conf) # [aur] # Server = file:///var/lib/repo/aur // after (/etc/pacman.conf) [aur] SigLevel = PackageOptional DatabaseOptional Server = file:///var/lib/repo/aur
Defensive patterns
Strategy: validation
Validate before calling
# confirm every local repo DB in CacheDir has a section in pacman.conf for db in /var/lib/repo/aur/*.db; do name=$(basename "$db" .db) grep -q "^\[$name\]" /etc/pacman.conf || echo "$db not in pacman.conf" done
Prevention
- Never remove a pacman.conf repo section without deleting its DB from CacheDir (or vice versa)
- Match the pacman.conf section name exactly to the .db filename
- Re-check pacman.conf after upgrades or manual edits before running paru
When it happens
Trigger: A repo database file exists in a pacman CacheDir (so repo_aur_dbs sees it), but /etc/pacman.conf contains no section whose Name matches repo.name() — checked at src/config.rs:820. Also occurs if the repo section was commented out or removed while its DB file remains.
Common situations: User deleted the [aur] section from pacman.conf but left the DB file in the cache dir; DB file dropped in CacheDir manually; repo name in pacman.conf misspelled relative to the .db filename; pacman.conf partially reverted after an upgrade.
Understand the failure class
Background: "X is required", "must be set", "cannot be empty": the missing-required-config error family, from Vertex AI project/location to WeChat keys — this error's family across 18 libraries.
Related errors
- no local repo named
- no local repos configured, add one to your pacman.conf: …
- section can not be called
- value can not be empty for key
- key ' ' does not belong to a section
AI-assisted analysis of Morganamilo/paru@9ac3578807 (2026-09-12).
Data as JSON: /api/errors/b98ed10ee499f437.
Report an issue: GitHub.
Appendix: source
Thrown at src/config.rs:820
if repos.is_empty() {
bail!(
"no local repos configured, add one to your pacman.conf:
[options]
CacheDir = /var/lib/repo/aur
[aur]
SigLevel = PackageOptional DatabaseOptional
Server = file:///var/lib/repo/aur
then initialise it with:
paru -Ly"
);
}
for repo in repos {
if !self.pacman.repos.iter().any(|r| r.name == repo.name()) {
bail!(tr!(
"can not find local repo '{}' in pacman.conf",
repo.name()
));
}
}
}
self.no_warn = self.no_warn_builder.build()?;
self.ignore_devel = self.ignore_devel_builder.build()?;
if !self.assume_installed.is_empty() && !self.chroot {
self.mflags.push("-d".to_string());
}
if self.no_check {
self.mflags.push("--nocheck".to_string());
}
if self.chroot {View on GitHub (pinned to 9ac3578807)