{"record":{"id":"e283d0df079da0f7","repo":"Morganamilo/paru","slug":"no-local-repo-named","errorCode":null,"errorMessage":"no local repo named {}","messagePattern":"no local repo named (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/config.rs","lineNumber":795,"sourceCode":"                repo.path = self.pkgbuild_repos.fetch.clone_dir.join(&repo.path);\n            }\n        }\n\n        if self.mode == Mode::empty() {\n            self.mode = Mode::all();\n        }\n\n        if !self.mode.pkgbuild() {\n            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:","sourceCodeStart":777,"sourceCodeEnd":813,"githubUrl":"https://github.com/Morganamilo/paru/blob/9ac3578807a87858651e81a02586ceb947686e7c/src/config.rs#L777-L813","documentation":"paru validates each repository listed under Repos in paru.conf against the AUR-related pacman databases actually open (repo::repo_aur_dbs). If a configured local repo name has no matching pacman database, it bails with 'no local repo named {repo}'. This catches a config entry pointing at a repo that was never initialized or was renamed.","triggerScenarios":"paru.conf contains a Repos = myrepo entry, but no pacman database named 'myrepo' exists among the local repo DBs (repo_aur_dbs) when Config::config_validation runs at src/config.rs:795.","commonSituations":"User added Repos = foo to paru.conf but never created the foo repo; repo was removed from pacman.conf; typo in repo name; database file deleted from CacheDir.","solutions":["Remove or correct the unknown repo name in the Repos line of paru.conf","Initialize the repo with paru -Ly after adding its section to pacman.conf","Verify the repo DB exists in the configured CacheDir (ls /var/lib/repo/aur)","Ensure the repo section ([myrepo] with Server=...) is present in pacman.conf so pacman registers it"],"exampleFix":"// before (paru.conf)\nRepos = myrepo aurclone\n\n// after (paru.conf)\nRepos = myrepo","handlingStrategy":"validation","validationCode":"# verify each Repos entry in paru.conf has a matching repo DB\nfor r in $(grep -A1 '^Repos' ~/.config/paru/paru.conf | cut -d= -f2); do\n  test -n \"$r\" || continue\n  ls /var/lib/repo/aur/${r}.db >/dev/null 2>&1 || echo \"missing repo: $r\"\ndone","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Run paru -Ly immediately after adding a new repo to paru.conf","Keep repo names in paru.conf and pacman.conf identical","Check the CacheDir actually contains the .db file after initialization"],"tags":["config","repository","pacman","validation"],"backgroundTag":"entity-not-found","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"}