jdx/mise · error · eyre::Report

remote Linux libc family could not be identified

Error message

remote Linux libc family could not be identified

What it means

Thrown by parse_remote_platform when the remote is Linux but the third line of the platform script's output is neither glibc nor musl. The script tries getconf GNU_LIBC_VERSION, then ldd --version, then globs for /lib/ld-musl-*.so.1; if all fail it prints 'unknown', which lands in this catch-all arm. mise needs the libc family to pick between linux-{arch} (glibc) and linux-{arch}-musl artifacts, so an unidentified family aborts platform detection.

Source

Thrown at src/system/remote.rs:1188

    if [ -z "$libc" ]; then
      for loader in /lib/ld-musl-*.so.1 /usr/lib/ld-musl-*.so.1; do
        if [ -e "$loader" ]; then libc=musl; break; fi
      done
    fi
    printf '%s\n' "${libc:-unknown}"
    ;;
  *) printf '%s\n' none ;;
esac"#
}

fn parse_remote_platform(output: &str) -> Result<RemotePlatform> {
    let mut lines = output.lines();
    let os = normalize_os(lines.next().unwrap_or_default());
    let arch = normalize_arch(lines.next().unwrap_or_default());
    let libc = match (os.as_str(), lines.next()) {
        ("linux", Some("glibc")) => Some(LibcFlavor::Glibc),
        ("linux", Some("musl")) => Some(LibcFlavor::Musl),
        ("linux", _) => bail!("remote Linux libc family could not be identified"),
        (_, Some("none")) => None,
        _ => bail!("remote platform response is incomplete"),
    };
    if os.is_empty() || arch.is_empty() || lines.next().is_some() {
        bail!("remote platform response is invalid");
    }
    Ok(RemotePlatform { os, arch, libc })
}

#[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]
struct AbiVersion(Vec<u32>);

impl fmt::Display for AbiVersion {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        f.write_str(
            &self
                .0
                .iter()

View on GitHub (pinned to 6f52dcdf99)

Solutions

  1. Set remote_mise (if mise is already on the remote) or bootstrap_command (e.g. the official install script) to bypass platform detection
  2. Install the probing tools on the remote: a libc with getconf/ldd (Debian/Ubuntu: libc-bin; Alpine: musl-utils provides ldd)
  3. For musl remotes, ensure /lib/ld-musl-{arch}.so.1 exists so the loader glob can classify it

Example fix

# before (mise.toml)
[bootstrap.remote.hosts.alpine]
host = "root@container"

# after
[bootstrap.remote.hosts.alpine]
host = "root@container"
bootstrap_command = "apk add curl && curl -fsSL https://mise.run | sh"
Defensive patterns

Strategy: validation

Validate before calling

# Pre-flight the exact probes mise uses before configuring auto-provisioning:
ssh root@container 'sh -c '\''
  getconf GNU_LIBC_VERSION 2>/dev/null && exit 0
  ldd --version 2>&1 | head -1 && exit 0
  ls /lib/ld-musl-*.so.1 /usr/lib/ld-musl-*.so.1 2>/dev/null && exit 0
  echo LIBC-UNDETECTABLE'
'\''
# LIBC-UNDETECTABLE -> install libc-bin/musl-utils on the remote, or set bootstrap_command

Type guard

fn libc_identifiable(os: &str, third_line: &str) -> bool {
    match normalize_os(os).as_str() {
        "linux" => third_line == "glibc" || third_line == "musl",
        _ => third_line == "none",
    }
}

Try / catch

match detect_remote_platform(&session) {
    Err(e) if e.to_string().contains("libc family could not be identified") => {
        // fall back to explicit provisioning rather than guessing an artifact
        ensure_remote_mise_via_bootstrap(&session, host).await?;
    }
    other => other?,
}

Prevention

When it happens

Trigger: Remote Linux with neither getconf nor ldd installed and no musl loader in /lib or /usr/lib (minimal busybox/distroless images), or an unusual libc (uClibc, custom static environments) whose ldd output mentions neither glibc nor musl.

Common situations: Alpine-based containers stripped of ldd; embedded/plated images; chroots with empty /bin; remotes where the admin removed coreutils/libc-bin for hardening.

Related errors


AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22). Data as JSON: /api/errors/bb3d0faec7fa9eda. Report an issue: GitHub.