oraios/serena · error · RuntimeError

Perl is not installed. Please install Perl from https://www.

Error message

Perl is not installed. Please install Perl from https://www.perl.org/get.html and make sure it is added to your PATH.

What it means

Raised when the Perl language server setup cannot detect a Perl interpreter (cls._get_perl_version() returns falsy). The library requires a working perl on PATH before it can run Perl::LanguageServer, so it aborts with instructions to install Perl.

Source

Thrown at src/solidlsp/language_servers/perl_language_server.py:101

        """
        Check if required Perl runtime dependencies are available.
        Raises RuntimeError with helpful message if dependencies are missing.
        """
        platform_id = PlatformUtils.get_platform_id()

        valid_platforms = [
            PlatformId.LINUX_x64,
            PlatformId.LINUX_arm64,
            PlatformId.OSX,
            PlatformId.OSX_x64,
            PlatformId.OSX_arm64,
        ]
        if platform_id not in valid_platforms:
            raise RuntimeError(f"Platform {platform_id} is not supported for Perl at the moment")

        perl_version = cls._get_perl_version()
        if not perl_version:
            raise RuntimeError(
                "Perl is not installed. Please install Perl from https://www.perl.org/get.html and make sure it is added to your PATH."
            )

        perl_ls_version = cls._get_perl_language_server_version()
        if not perl_ls_version:
            raise RuntimeError(
                "Found a Perl version but Perl::LanguageServer is not installed.\n"
                "Please install Perl::LanguageServer: cpanm Perl::LanguageServer\n"
                "See: https://metacpan.org/pod/Perl::LanguageServer"
            )

        return "perl -MPerl::LanguageServer -e 'Perl::LanguageServer::run'"

    @staticmethod
    def _resolve_filter_settings(solidlsp_settings: SolidLSPSettings) -> tuple[list[str], list[str]]:
        """Resolve the ``fileFilter`` / ``ignoreDirs`` to hand to Perl::LanguageServer.

        Reads optional overrides from ``ls_specific_settings["perl"]`` (keys ``file_filter`` and

View on GitHub (pinned to 7fcbca7e62)

Solutions

  1. Install Perl: on Linux `sudo apt install perl` / `dnf install perl`; on macOS it ships by default; on Windows use Strawberry Perl.
  2. Verify `perl -v` works in the same shell that launches the server; fix PATH if the binary exists but isn't found (e.g. add C:\Strawberry\perl\bin on Windows).
  3. If using perlbrew/plenv, activate the environment (`perlbrew use <ver>`) before launching so the version probe sees perl.
  4. In containers, add perl installation to the image before starting the server.

Example fix

// before (Dockerfile, minimal image)
FROM ubuntu:24.04
CMD python -m app  # perl missing
// after
FROM ubuntu:24.04
RUN apt-get update && apt-get install -y perl
CMD python -m app
Defensive patterns

Strategy: validation

Validate before calling

import shutil, subprocess
def perl_installed():
    if not shutil.which("perl"):
        return False
    return subprocess.run(["perl", "-v"], capture_output=True).returncode == 0

Prevention

When it happens

Trigger: Instantiating the Perl language server when `perl -v` (or equivalent version probe) fails or returns nothing — perl absent, not on PATH, or broken installation.

Common situations: Perl not installed (common on minimal Docker images and fresh Windows machines); perl installed but not on PATH for the launching process; perlbrew/plenv environment not activated; broken perl after OS upgrade.

Related errors


AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29). Data as JSON: /api/errors/0feae094cc083393. Report an issue: GitHub.