{"record":{"id":"6bbcc4b0569c6a76","repo":"Morganamilo/paru","slug":"no-local-repos-configured-add-one-to-your-pacman-conf","errorCode":null,"errorMessage":"no local repos configured, add one to your pacman.conf:\n    [options]\n    CacheDir = /var/lib/repo/aur\n\n    [aur]\n    SigLevel = PackageOptional DatabaseOptional\n    Server = file:///var/lib/repo/aur\n\nthen initialise it with:\n    paru -Ly","messagePattern":"no local repos configured, add one to your pacman\\.conf:\n    \\[options\\]\n    CacheDir = /var/lib/repo/aur\n\n    \\[aur\\]\n    SigLevel = PackageOptional DatabaseOptional\n    Server = file:///var/lib/repo/aur\n\nthen initialise it with:\n    paru -Ly","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/config.rs","lineNumber":804,"sourceCode":"            self.pkgbuild_repos.repos.clear();\n        }\n\n        self.need_root = self.need_root();\n\n        if let LocalRepos::Repo(repos) = &self.repos {\n            let (_, db) = repo::repo_aur_dbs(self);\n            for repo in repos {\n                if !db.iter().any(|db| db.name() == repo) {\n                    bail!(\"{}\", tr!(\"no local repo named {}\", repo))\n                }\n            }\n        }\n\n        if self.repos != LocalRepos::None {\n            let (_, repos) = repo::repo_aur_dbs(self);\n\n            if repos.is_empty() {\n                bail!(\n                    \"no local repos configured, add one to your pacman.conf:\n    [options]\n    CacheDir = /var/lib/repo/aur\n\n    [aur]\n    SigLevel = PackageOptional DatabaseOptional\n    Server = file:///var/lib/repo/aur\n\nthen initialise it with:\n    paru -Ly\"\n                );\n            }\n\n            for repo in repos {\n                if !self.pacman.repos.iter().any(|r| r.name == repo.name()) {\n                    bail!(tr!(\n                        \"can not find local repo '{}' in pacman.conf\",\n                        repo.name()","sourceCodeStart":786,"sourceCodeEnd":822,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/config.rs#L786-L822","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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","Create the repo directory and initialize it: mkdir -p /var/lib/repo/aur && paru -Ly","If you don't want a local repo, remove the Repos line from paru.conf so LocalRepos is None"],"exampleFix":"// before (/etc/pacman.conf)\n# (no local repo section)\n\n// after (/etc/pacman.conf)\n[options]\nCacheDir = /var/lib/repo/aur\n\n[aur]\nSigLevel = PackageOptional DatabaseOptional\nServer = file:///var/lib/repo/aur","handlingStrategy":"validation","validationCode":"# ensure at least one local AUR repo is configured and initialized\nls /var/lib/repo/aur/*.db >/dev/null 2>&1 || { echo 'no local repo DB; add [aur] section to pacman.conf and run paru -Ly'; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Initialize the local repo (paru -Ly) right after enabling Repos in paru.conf","Keep the pacman.conf [aur] section with CacheDir, SigLevel, and Server as documented","Remove the Repos line from paru.conf if you don't use local repos"],"tags":["config","repository","pacman","setup","paru"],"backgroundTag":"missing-required-config","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"}