Morganamilo/paru · error

no local repos configured, add one to your pacman.conf: …

Error message

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

What it means

If paru is configured to use local repos (Repos is not None/... but not an empty set) yet repo_aur_dbs finds zero AUR databases, paru bails with a long instructional message explaining how to configure a local repo in pacman.conf and initialize it with 'paru -Ly'. It guides users who enabled the local-repo feature without setting up any repo.

Solutions

  1. Follow the error's instructions: add a repo section to pacman.conf (CacheDir under [options], plus [aur] section with SigLevel and Server), then run paru -Ly
  2. Create the repo directory and initialize it: mkdir -p /var/lib/repo/aur && paru -Ly
  3. If you don't want a local repo, remove the Repos line from paru.conf so LocalRepos is None

Example fix

// before (/etc/pacman.conf)
# (no local repo section)

// after (/etc/pacman.conf)
[options]
CacheDir = /var/lib/repo/aur

[aur]
SigLevel = PackageOptional DatabaseOptional
Server = file:///var/lib/repo/aur
Defensive patterns

Strategy: validation

Validate before calling

# ensure at least one local AUR repo is configured and initialized
ls /var/lib/repo/aur/*.db >/dev/null 2>&1 || { echo 'no local repo DB; add [aur] section to pacman.conf and run paru -Ly'; }

Prevention

When it happens

Trigger: self.repos is set (e.g. Repos = oneRepo in paru.conf) but the set of local AUR repos returned by repo::repo_aur_dbs is empty when validation runs at src/config.rs:804 — no repo DB exists in any pacman CacheDir marked for AUR use.

Common situations: Fresh install after enabling the local repo feature; pacman.conf lacks any [repo] section with a Server pointing at an AUR cache dir; CacheDir points at an empty directory; user never ran paru -Ly.

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


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

Appendix: source

Thrown at src/config.rs:804

            self.pkgbuild_repos.repos.clear();
        }

        self.need_root = self.need_root();

        if let LocalRepos::Repo(repos) = &self.repos {
            let (_, db) = repo::repo_aur_dbs(self);
            for repo in repos {
                if !db.iter().any(|db| db.name() == repo) {
                    bail!("{}", tr!("no local repo named {}", repo))
                }
            }
        }

        if self.repos != LocalRepos::None {
            let (_, repos) = repo::repo_aur_dbs(self);

            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()

View on GitHub (pinned to 9ac3578807)