{"record":{"id":"2fba0571c7b03363","repo":"jdx/mise","slug":"precompiled-erlang-is-not-available-reason","errorCode":null,"errorMessage":"precompiled erlang is not available: {reason}","messagePattern":"precompiled erlang is not available: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/erlang.rs","lineNumber":98,"sourceCode":"    }\n\n    async fn install_kerl(&self) -> Result<()> {\n        debug!(\"Installing kerl to {}\", display_path(self.kerl_path()));\n        HTTP_FETCH\n            .download_file(\n                format!(\"https://raw.githubusercontent.com/kerl/kerl/{KERL_VERSION}/kerl\"),\n                &self.kerl_path(),\n                None,\n            )\n            .await?;\n        file::make_executable(self.kerl_path())?;\n        Ok(())\n    }\n\n    fn precompiled_unavailable(&self, reason: impl Into<String>) -> Result<Option<ToolVersion>> {\n        let reason = reason.into();\n        if Settings::get().erlang_compile(CompilePurpose::Inspect) == Some(false) {\n            bail!(\"precompiled erlang is not available: {reason}\");\n        }\n        debug!(\"{reason}\");\n        Ok(None)\n    }\n\n    fn release_tag(version: &str) -> String {\n        format!(\"OTP-{version}\")\n    }\n\n    fn lockfile_url(&self, locked: bool, tv: &ToolVersion) -> Option<String> {\n        locked_platform_url(locked, &tv.lock_platforms, &self.get_platform_key())\n    }\n\n    fn set_lockfile_info(\n        &self,\n        tv: &mut ToolVersion,\n        install: Option<&str>,\n        url: &str,","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/plugins/core/erlang.rs#L80-L116","documentation":"Thrown by mise's core erlang plugin when the precompiled OTP install path (hex.pm Bob builds, erlef/otp_builds, or erlang/otp releases) failed and erlang.compile is explicitly false, which forbids the kerl source-build fallback. The {reason} carries the underlying failure text (musl linux, unsupported OS/arch, missing Hex build record, GitHub release error). With compile unset or true, the same condition only emits a debug log and mise builds Erlang from source instead, so this error means 'no precompiled artifact AND you forbade compiling'.","triggerScenarios":"`mise install erlang` (or any command that installs it, e.g. `mise use erlang@27.1`) on a host where `mise settings get erlang.compile` is false, AND the precompiled path fails: musl/Alpine Linux, non-Ubuntu distro, riscv64/s390x-class arch, an OTP version absent from builds.txt, or a GitHub API error fetching erlef/otp_builds.","commonSituations":"CI pinned to erlang.compile=false for reproducible precompiled installs, then the runner base image changes (ubuntu-latest moves past 24.04, or a switch to Alpine) and no precompiled build exists; developers on Fedora/Arch/Debian inheriting a teammate's Ubuntu-oriented config with compile=false.","solutions":["Allow the source fallback: `mise settings set erlang.compile true` (or `mise settings unset erlang.compile`) so kerl builds OTP when no precompiled build exists","Run on a platform that has precompiled OTP: Ubuntu 20.04/22.04/24.04 glibc on x64/arm64, macOS x64/arm64, or Windows x64/x86","If you must keep compile=false, pin CI to a supported image (e.g. GitHub Actions `runs-on: ubuntu-24.04`) so the precompiled path succeeds","If {reason} says the build/release is missing, pick an OTP version listed at https://builds.hex.pm/builds/otp/<arch>/<os>/builds.txt"],"exampleFix":"# before (~/.config/mise/settings.toml)\n[erlang]\ncompile = false\n\n# after — permit source compilation when no precompiled artifact exists\n[erlang]\ncompile = true","handlingStrategy":"fallback","validationCode":"# before installing erlang, check the compile policy vs the platform\nif [ \"$(mise settings get erlang.compile)\" = \"false\" ]; then\n  . /etc/os-release 2>/dev/null || true\n  case \"${ID:-}-${VERSION_ID:-}\" in ubuntu-20.04|ubuntu-22.04|ubuntu-24.04) ;; *) echo \"no precompiled OTP here; allowing source build\" && mise settings set erlang.compile true ;; esac\nfi\nmise install erlang@27.1","typeGuard":null,"tryCatchPattern":"if ! mise install erlang@27.1 2>&1 | tee /dev/stderr | grep -q 'precompiled erlang is not available'; then\n  mise install erlang@27.1   # grep found the error → configure compile=true and retry\nelse\n  mise settings set erlang.compile true && mise install erlang@27.1\nfi","preventionTips":["Don't set erlang.compile=false globally; scope it to runners you know are Ubuntu 20.04/22.04/24.04 glibc on x64/arm64","Pin CI images to ubuntu-24.04 instead of ubuntu-latest so the precompiled path keeps working","Document in the repo's mise.toml comment which platforms the erlang config is validated on"],"tags":["mise","erlang","otp","precompiled","compile-fallback","settings"],"backgroundTag":"precompiled-binary-unavailable","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}