{"record":{"id":"471758337227998d","repo":"oraios/serena","slug":"clangd-is-not-installed-on-your-system-please-ins","errorCode":null,"errorMessage":"Clangd is not installed on your system.\nPlease install clangd using your system package manager:\n  Ubuntu/Debian: sudo apt-get install clangd\n  Fedora/RHEL: sudo dnf install clang-tools-extra\n  Arch Linux: sudo pacman -S clang\nSee https://clangd.llvm.org/installation for more details.","messagePattern":"Clangd is not installed on your system\\.\nPlease install clangd using your system package manager:\n  Ubuntu/Debian: sudo apt-get install clangd\n  Fedora/RHEL: sudo dnf install clang-tools-extra\n  Arch Linux: sudo pacman -S clang\nSee https://clangd\\.llvm\\.org/installation for more details\\.","errorType":"exception","errorClass":"FileNotFoundError","httpStatus":null,"severity":"error","filePath":"src/solidlsp/language_servers/clangd_language_server.py","lineNumber":288,"sourceCode":"                        binary_name=f\"clangd_{clangd_version}/bin/clangd\",\n                        sha256=\"d3b329b3f58602c57ca6501d255147af1bccad3691b1cb0c12c258fcd2da1be3\" if default_version else None,\n                        allowed_hosts=CLANGD_ALLOWED_HOSTS,\n                    ),\n                ]\n            )\n\n            clangd_ls_dir = os.path.join(self._ls_resources_dir, \"clangd\")\n\n            try:\n                dep = deps.get_single_dep_for_current_platform()\n            except RuntimeError:\n                dep = None\n\n            if dep is None:\n                # No prebuilt binary available, look for system-installed clangd\n                clangd_executable_path = shutil.which(\"clangd\")\n                if not clangd_executable_path:\n                    raise FileNotFoundError(\n                        \"Clangd is not installed on your system.\\n\"\n                        + \"Please install clangd using your system package manager:\\n\"\n                        + \"  Ubuntu/Debian: sudo apt-get install clangd\\n\"\n                        + \"  Fedora/RHEL: sudo dnf install clang-tools-extra\\n\"\n                        + \"  Arch Linux: sudo pacman -S clang\\n\"\n                        + \"See https://clangd.llvm.org/installation for more details.\"\n                    )\n                log.info(f\"Using system-installed clangd at {clangd_executable_path}\")\n            else:\n                # Standard download and install for platforms with prebuilt binaries\n                clangd_executable_path = deps.binary_path(clangd_ls_dir)\n                if not os.path.exists(clangd_executable_path):\n                    log.info(f\"Clangd executable not found at {clangd_executable_path}. Downloading from {dep.url}\")\n                    _ = deps.install(clangd_ls_dir)\n                if not os.path.exists(clangd_executable_path):\n                    raise FileNotFoundError(\n                        f\"Clangd executable not found at {clangd_executable_path}.\\n\"\n                        + \"Make sure you have installed clangd. See https://clangd.llvm.org/installation\"","sourceCodeStart":270,"sourceCodeEnd":306,"githubUrl":"https://github.com/oraios/serena/blob/7fcbca7e62555ec2287ddb2f083caee805848ea6/src/solidlsp/language_servers/clangd_language_server.py#L270-L306","documentation":"_get_or_install_core_dependency raises FileNotFoundError when no prebuilt clangd binary is available for the platform and no system-installed clangd is found via shutil.which. The library first tries a managed prebuilt download, then falls back to the system clangd, and throws this actionable error if both are unavailable.","triggerScenarios":"Starting the clangd language server when deps.binary_path yields no prebuilt binary for the current platform and shutil.which('clangd') returns None.","commonSituations":"clangd not installed on the machine; platform without a managed prebuilt binary (unusual OS/arch); clang installed without the clangd component (e.g. needs clang-tools-extra on Fedora); PATH not including the LLVM install directory.","solutions":["Install clangd via the system package manager: sudo apt-get install clangd (Ubuntu/Debian), sudo dnf install clang-tools-extra (Fedora/RHEL), sudo pacman -S clang (Arch)","Install LLVM/clangd from https://clangd.llvm.org/installation and add its bin directory to PATH","Restart/reconnect the language server after installing so the detection re-runs"],"exampleFix":"// before\n# clangd not found -> FileNotFoundError\n// after\nsudo apt-get install clangd\nclangd --version  # verify","handlingStrategy":"validation","validationCode":"import shutil\nassert shutil.which(\"clangd\"), \"Install clangd: apt-get install clangd | dnf install clang-tools-extra | pacman -S clang (see clangd.llvm.org/installation)\"","typeGuard":null,"tryCatchPattern":"try:\n    server = ClangdLanguageServer(...)\nexcept FileNotFoundError as e:\n    if \"Clangd is not installed\" in str(e):\n        raise SystemExit(\"Install clangd via your package manager or LLVM binaries, then restart the server\")\n    raise","preventionTips":["Install clangd (not just clang) on dev machines and CI images — Fedora needs clang-tools-extra","Add LLVM install bin directories to PATH if installing clangd outside the package manager","Verify `clangd --version` in the same environment Serena runs in"],"tags":["clangd","installation","path","cpp","llvm"],"backgroundTag":"required-executable-not-on-path","analyzedSha":"7fcbca7e62555ec2287ddb2f083caee805848ea6","analyzedAt":"2026-08-29T00:04:09.619Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}