{"record":{"id":"693d83f951f66ac9","repo":"jdx/mise","slug":"precompiled-erlang-is-not-supported-on-musl-linux","errorCode":null,"errorMessage":"precompiled erlang is not supported on musl linux","messagePattern":"precompiled erlang is not supported on musl linux","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/erlang.rs","lineNumber":168,"sourceCode":"            Self::release_tag(version),\n            Self::source_asset_name(version)\n        )\n    }\n\n    fn source_archive_url(version: &str) -> String {\n        format!(\n            \"https://github.com/erlang/otp/archive/{}.tar.gz\",\n            Self::release_tag(version)\n        )\n    }\n\n    fn source_cache_name(url: &str) -> String {\n        format!(\"otp-source-{}.tar.gz\", crate::hash::hash_sha256_to_str(url))\n    }\n\n    fn linux_precompiled_base_url(target: &PlatformTarget) -> Result<String> {\n        if target.libc() == Some(\"musl\") {\n            bail!(\"precompiled erlang is not supported on musl linux\");\n        }\n        let arch = match target.arch_name() {\n            \"x64\" => \"amd64\",\n            \"arm64\" => \"arm64\",\n            other => bail!(\"unsupported architecture: {other}\"),\n        };\n        let os_ver = Self::linux_precompiled_os_version()?;\n        Ok(format!(\"https://builds.hex.pm/builds/otp/{arch}/{os_ver}\"))\n    }\n\n    async fn linux_precompiled_lock_info(\n        version: &str,\n        target: &PlatformTarget,\n    ) -> Result<PlatformInfo> {\n        let base_url = Self::linux_precompiled_base_url(target)?;\n        let release_tag = Self::release_tag(version);\n        let builds = HTTP_FETCH\n            .get_text_cached(format!(\"{base_url}/builds.txt\"))","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/plugins/core/erlang.rs#L150-L186","documentation":"Precompiled Erlang builds from Hex (Bob) are not published for musl-linked Linux (Alpine, etc.). When resolving the download base URL for the target platform, mise refuses up front if the target libc is musl.","triggerScenarios":"`mise install erlang@<version>` on a musl Linux system (or targeting musl) with source compilation not explicitly disabled — precompiled_unavailable then reports this reason or falls back to compile.","commonSituations":"Alpine Linux containers/CI images; musl-based Dockerfiles trying to precompile-install Erlang quickly.","solutions":["Compile from source (ensure erlang_compile is enabled; install build deps gcc, make, openssl-dev, ncurses)","Use a glibc-based base image (debian/ubuntu) for precompiled builds","Find a musl precompiled build via a different backend or kerl/asdf plugin"],"exampleFix":"# before\nFROM alpine:3.19\nRUN mise install erlang@26.2\n# after\nFROM debian:bookworm\nRUN mise install erlang@26.2","handlingStrategy":"fallback","validationCode":"# guard before install\n[ \"$(ldd --version 2>/dev/null | grep -c musl)\" = \"0\" ] && echo \"glibc: precompiled OK\" || echo \"musl: needs compile\"","typeGuard":null,"tryCatchPattern":"catch (e) {\n  if (/musl linux/.test(String(e))) {\n    // fall back to source compile or glibc image\n  }\n}","preventionTips":["Use glibc-based images (debian/ubuntu) when precompiled speed matters","Install compile deps (gcc, make, openssl-dev, ncurses) in musl images preemptively","Document musl limitation in Dockerfiles using mise + erlang"],"tags":["erlang","musl","platform","linux"],"backgroundTag":"unsupported-platform","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}