{"record":{"id":"8f76a6701ae09e7a","repo":"composer/composer","slug":"fossil-was-not-found-check-that-it-is-installed-a","errorCode":null,"errorMessage":"fossil was not found, check that it is installed and in your PATH env.\n\n${errorOutput}","messagePattern":"fossil was not found, check that it is installed and in your PATH env\\.\n\n(.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"critical","filePath":"src/Composer/Repository/Vcs/FossilDriver.php","lineNumber":76,"sourceCode":"\n            $localName = Preg::replace('{[^a-z0-9]}i', '-', $this->url);\n            $this->repoFile = $this->config->get('cache-repo-dir') . '/' . $localName . '.fossil';\n            $this->checkoutDir = $this->config->get('cache-vcs-dir') . '/' . $localName . '/';\n\n            $this->updateLocalRepo();\n        }\n\n        $this->getTags();\n        $this->getBranches();\n    }\n\n    /**\n     * Check that fossil can be invoked via command line.\n     */\n    protected function checkFossil(): void\n    {\n        if (0 !== $this->process->execute(['fossil', 'version'], $ignoredOutput)) {\n            throw new \\RuntimeException(\"fossil was not found, check that it is installed and in your PATH env.\\n\\n\" . $this->process->getErrorOutput());\n        }\n    }\n\n    /**\n     * Clone or update existing local fossil repository.\n     */\n    protected function updateLocalRepo(): void\n    {\n        assert($this->repoFile !== null);\n\n        $fs = new Filesystem();\n        $fs->ensureDirectoryExists($this->checkoutDir);\n\n        if (!is_writable(dirname($this->checkoutDir))) {\n            throw new \\RuntimeException('Can not clone '.Url::sanitize($this->url).' to access package information. The \"'.$this->checkoutDir.'\" directory is not writable by the current user.');\n        }\n\n        // update the repo if it is a valid fossil repository","sourceCodeStart":58,"sourceCodeEnd":94,"githubUrl":"https://github.com/composer/composer/blob/6ffc1177404d0c50119c22dde6564a380f4a82c9/src/Composer/Repository/Vcs/FossilDriver.php#L58-L94","documentation":"Thrown by FossilDriver::checkFossil() (src/Composer/Repository/Vcs/FossilDriver.php:76) when `fossil version` cannot be executed successfully (non-zero exit). The FossilDriver shells out to the fossil SCM binary for every operation, so a missing/unreachable fossil binary prevents any fossil repository from working. The message appends the process error output.","triggerScenarios":"Declaring any 'fossil' type repository (or a URL matching FossilDriver::supports) on a machine where the fossil executable is absent, not on PATH, or fails to start. checkFossil() runs during initialize() before anything else.","commonSituations":"fossil not installed on the host/container; fossil installed but not on $PATH for the user running Composer; a broken fossil binary (permissions, missing shared libs); Alpine/slim images without fossil.","solutions":["Install fossil (e.g. `apt-get install fossil`, `apk add fossil`, or download the single binary from fossil-scm.org) and confirm `fossil version` works.","Ensure the fossil binary directory is on PATH for the user/shell invoking Composer.","If you do not actually need fossil, remove the fossil-type repository entry or correct the type to git/svn/vcs."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"$proc = new \\Composer\\Util\\ProcessExecutor($io);\nif ($proc->execute(['fossil','version'], $out) !== 0) {\n    throw new \\RuntimeException('fossil binary not available; install fossil and put it on PATH');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Install fossil and verify `fossil version` succeeds in every environment using fossil repos.","Add the fossil binary directory to PATH for the user invoking Composer.","In containers, include fossil in the image (apk add fossil / apt-get install fossil)."],"tags":["fossil","vcs","environment","binary","path"],"analyzedSha":"6ffc1177404d0c50119c22dde6564a380f4a82c9","analyzedAt":"2026-08-07T00:01:08.491Z","schemaVersion":2},"datasetVersion":"2026-08-07T02:17:10.218Z"}