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`` andView on GitHub (pinned to 7fcbca7e62)
Solutions
- Install Perl: on Linux `sudo apt install perl` / `dnf install perl`; on macOS it ships by default; on Windows use Strawberry Perl.
- 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).
- If using perlbrew/plenv, activate the environment (`perlbrew use <ver>`) before launching so the version probe sees perl.
- 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
- Install perl in images/CI before running the server
- Add perl to PATH (Strawberry Perl on Windows: C:\Strawberry\perl\bin)
- Activate perlbrew/plenv environments before launch
- Preflight with `perl -v` in the exact launching environment
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
- Elixir is not installed. Please install Elixir from https://
- Erlang LS not found. Install from: https://github.com/erlang
- Erlang/OTP not found. Install from: https://www.erlang.org/d
- lean is not installed or not in PATH. Please install Lean 4
- ocaml-lsp-server is not installed. Please install it with:
AI-assisted analysis of oraios/serena@7fcbca7e62 (2026-08-29).
Data as JSON: /api/errors/0feae094cc083393.
Report an issue: GitHub.