{"record":{"id":"bb3d0faec7fa9eda","repo":"jdx/mise","slug":"remote-linux-libc-family-could-not-be-identified","errorCode":null,"errorMessage":"remote Linux libc family could not be identified","messagePattern":"remote Linux libc family could not be identified","errorType":"exception","errorClass":"eyre::Report","httpStatus":null,"severity":"error","filePath":"src/system/remote.rs","lineNumber":1188,"sourceCode":"    if [ -z \"$libc\" ]; then\n      for loader in /lib/ld-musl-*.so.1 /usr/lib/ld-musl-*.so.1; do\n        if [ -e \"$loader\" ]; then libc=musl; break; fi\n      done\n    fi\n    printf '%s\\n' \"${libc:-unknown}\"\n    ;;\n  *) printf '%s\\n' none ;;\nesac\"#\n}\n\nfn parse_remote_platform(output: &str) -> Result<RemotePlatform> {\n    let mut lines = output.lines();\n    let os = normalize_os(lines.next().unwrap_or_default());\n    let arch = normalize_arch(lines.next().unwrap_or_default());\n    let libc = match (os.as_str(), lines.next()) {\n        (\"linux\", Some(\"glibc\")) => Some(LibcFlavor::Glibc),\n        (\"linux\", Some(\"musl\")) => Some(LibcFlavor::Musl),\n        (\"linux\", _) => bail!(\"remote Linux libc family could not be identified\"),\n        (_, Some(\"none\")) => None,\n        _ => bail!(\"remote platform response is incomplete\"),\n    };\n    if os.is_empty() || arch.is_empty() || lines.next().is_some() {\n        bail!(\"remote platform response is invalid\");\n    }\n    Ok(RemotePlatform { os, arch, libc })\n}\n\n#[derive(Clone, Debug, Eq, Ord, PartialEq, PartialOrd)]\nstruct AbiVersion(Vec<u32>);\n\nimpl fmt::Display for AbiVersion {\n    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {\n        f.write_str(\n            &self\n                .0\n                .iter()","sourceCodeStart":1170,"sourceCodeEnd":1206,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/system/remote.rs#L1170-L1206","documentation":"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.","triggerScenarios":"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.","commonSituations":"Alpine-based containers stripped of ldd; embedded/plated images; chroots with empty /bin; remotes where the admin removed coreutils/libc-bin for hardening.","solutions":["Set remote_mise (if mise is already on the remote) or bootstrap_command (e.g. the official install script) to bypass platform detection","Install the probing tools on the remote: a libc with getconf/ldd (Debian/Ubuntu: libc-bin; Alpine: musl-utils provides ldd)","For musl remotes, ensure /lib/ld-musl-{arch}.so.1 exists so the loader glob can classify it"],"exampleFix":"# before (mise.toml)\n[bootstrap.remote.hosts.alpine]\nhost = \"root@container\"\n\n# after\n[bootstrap.remote.hosts.alpine]\nhost = \"root@container\"\nbootstrap_command = \"apk add curl && curl -fsSL https://mise.run | sh\"","handlingStrategy":"validation","validationCode":"# Pre-flight the exact probes mise uses before configuring auto-provisioning:\nssh root@container 'sh -c '\\''\n  getconf GNU_LIBC_VERSION 2>/dev/null && exit 0\n  ldd --version 2>&1 | head -1 && exit 0\n  ls /lib/ld-musl-*.so.1 /usr/lib/ld-musl-*.so.1 2>/dev/null && exit 0\n  echo LIBC-UNDETECTABLE'\n'\\''\n# LIBC-UNDETECTABLE -> install libc-bin/musl-utils on the remote, or set bootstrap_command","typeGuard":"fn libc_identifiable(os: &str, third_line: &str) -> bool {\n    match normalize_os(os).as_str() {\n        \"linux\" => third_line == \"glibc\" || third_line == \"musl\",\n        _ => third_line == \"none\",\n    }\n}","tryCatchPattern":"match detect_remote_platform(&session) {\n    Err(e) if e.to_string().contains(\"libc family could not be identified\") => {\n        // fall back to explicit provisioning rather than guessing an artifact\n        ensure_remote_mise_via_bootstrap(&session, host).await?;\n    }\n    other => other?,\n}","preventionTips":["Minimal images: install ldd (Debian: libc-bin; Alpine: musl-utils) or keep a musl loader in /lib","For stripped/distroless remotes, prefer bootstrap_command over auto-detection","Smoke-test new remotes with the one-liner probe before adding them to hosts config"],"tags":["mise","remote-bootstrap","libc","platform-detection","linux","musl","glibc"],"backgroundTag":"libc-detection-failed","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}