jdx/mise · error

precompiled erlang is not available

Error message

precompiled erlang is not available: {reason}

What it means

Erlang can be installed precompiled (Hex builds) or compiled from source. This bail fires when a precompiled build is unavailable for the requested platform/version AND the erlang_compile setting is explicitly Some(false), meaning mise is forbidden from falling back to source compilation.

Solutions

  1. Enable source compilation: remove MISE_ERLANG_COMPILE=false or set erlang_compile = true in settings
  2. Pick an Erlang version that has a precompiled build for your platform on builds.hex.pm
  3. Change the platform/distro target (e.g. use a supported Ubuntu version) if you need precompiled
  4. Pin a version known to have precompiled artifacts for musl-free Linux/macOS

Example fix

// before
MISE_ERLANG_COMPILE=false mise install erlang@26.0
// after
mise settings set erlang_compile true
mise install erlang@26.0
Defensive patterns

Strategy: fallback

Validate before calling

# check if compilation is allowed and platform has precompiled builds
mise settings get erlang_compile
uname -m  # confirm arch has hex.pm builds

Try / catch

catch (e) {
  if (/precompiled erlang is not available/.test(String(e))) {
    // enable erlang_compile or switch version/platform
  }
}

Prevention

When it happens

Trigger: `mise install erlang@<version>` on a platform/version with no precompiled Hex build while `erlang_compile` is explicitly disabled in settings (e.g. MISE_ERLANG_COMPILE=false), so precompiled_unavailable becomes fatal instead of falling back.

Common situations: Users who disabled compilation for speed/CI hitting a platform gap (no Hex build for their distro/arch); CI configs that hard-set erlang_compile=false then request an unusual Erlang version.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/2fba0571c7b03363. Report an issue: GitHub.

Appendix: source

Thrown at src/plugins/core/erlang.rs:98

    }

    async fn install_kerl(&self) -> Result<()> {
        debug!("Installing kerl to {}", display_path(self.kerl_path()));
        HTTP_FETCH
            .download_file(
                format!("https://raw.githubusercontent.com/kerl/kerl/{KERL_VERSION}/kerl"),
                &self.kerl_path(),
                None,
            )
            .await?;
        file::make_executable(self.kerl_path())?;
        Ok(())
    }

    fn precompiled_unavailable(&self, reason: impl Into<String>) -> Result<Option<ToolVersion>> {
        let reason = reason.into();
        if Settings::get().erlang_compile(CompilePurpose::Inspect) == Some(false) {
            bail!("precompiled erlang is not available: {reason}");
        }
        debug!("{reason}");
        Ok(None)
    }

    fn release_tag(version: &str) -> String {
        format!("OTP-{version}")
    }

    fn lockfile_url(&self, locked: bool, tv: &ToolVersion) -> Option<String> {
        locked_platform_url(locked, &tv.lock_platforms, &self.get_platform_key())
    }

    fn set_lockfile_info(
        &self,
        tv: &mut ToolVersion,
        install: Option<&str>,
        url: &str,

View on GitHub (pinned to 533346cc37)