composer/composer · critical · RuntimeException

fossil was not found, check that it is installed and in your

Error message

fossil was not found, check that it is installed and in your PATH env.

${errorOutput}

What it means

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.

Source

Thrown at src/Composer/Repository/Vcs/FossilDriver.php:76

            $localName = Preg::replace('{[^a-z0-9]}i', '-', $this->url);
            $this->repoFile = $this->config->get('cache-repo-dir') . '/' . $localName . '.fossil';
            $this->checkoutDir = $this->config->get('cache-vcs-dir') . '/' . $localName . '/';

            $this->updateLocalRepo();
        }

        $this->getTags();
        $this->getBranches();
    }

    /**
     * Check that fossil can be invoked via command line.
     */
    protected function checkFossil(): void
    {
        if (0 !== $this->process->execute(['fossil', 'version'], $ignoredOutput)) {
            throw new \RuntimeException("fossil was not found, check that it is installed and in your PATH env.\n\n" . $this->process->getErrorOutput());
        }
    }

    /**
     * Clone or update existing local fossil repository.
     */
    protected function updateLocalRepo(): void
    {
        assert($this->repoFile !== null);

        $fs = new Filesystem();
        $fs->ensureDirectoryExists($this->checkoutDir);

        if (!is_writable(dirname($this->checkoutDir))) {
            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.');
        }

        // update the repo if it is a valid fossil repository

View on GitHub (pinned to 6ffc117740)

Solutions

  1. 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.
  2. Ensure the fossil binary directory is on PATH for the user/shell invoking Composer.
  3. If you do not actually need fossil, remove the fossil-type repository entry or correct the type to git/svn/vcs.
Defensive patterns

Strategy: validation

Validate before calling

$proc = new \Composer\Util\ProcessExecutor($io);
if ($proc->execute(['fossil','version'], $out) !== 0) {
    throw new \RuntimeException('fossil binary not available; install fossil and put it on PATH');
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of composer/composer@6ffc117740 (2026-08-07). Data as JSON: /api/errors/8f76a6701ae09e7a. Report an issue: GitHub.