Hmbown/CodeWhale · error · anyhow::Error
Prebuilt Codewhale asset `{asset_name}` requires GLIBC_{requ
Error message
Prebuilt Codewhale asset `{asset_name}` requires GLIBC_{required}, but {host_line}
Official Linux release binaries are GNU libc builds. Ubuntu 22.04 ships glibc
2.35, so it cannot run a binary that was built against Ubuntu 24.04/glibc 2.39.
Install from source on this host instead:
cargo install codewhale-cli --locked
Release engineering follow-up: build Linux GNU assets against an older glibc
baseline, or add a musl/static Linux asset. Set CODEWHALE_SKIP_GLIBC_CHECK=1 to
bypass this preflight at your own risk. What it means
Before installing a downloaded prebuilt Linux binary, the updater scans it for the highest required GLIBC_x.y symbol version and compares it to the host's glibc (detected via `getconf GNU_LIBC_VERSION`). If the host glibc is older than the binary requires, the install is refused with a message naming the asset, the required version, and the host line, because the binary would crash at startup with 'version GLIBC_2.xx not found'.
Source
Thrown at crates/cli/src/update.rs:1653
}
fn preflight_downloaded_binary(asset_name: &str, bytes: &[u8]) -> Result<()> {
// GNU libc preflight is Linux-only (#4241). Rust treats `target_os = "android"`
// as distinct from `"linux"`, so Termux/Android builds skip this check entirely
// — Android uses Bionic libc, not glibc.
if !cfg!(target_os = "linux") || glibc_check_disabled() {
return Ok(());
}
let Some(required) = highest_required_glibc(bytes) else {
return Ok(());
};
let host = detect_host_glibc();
if host.is_some_and(|host| host >= required) {
return Ok(());
}
bail!(
"{}",
glibc_compatibility_message(asset_name, required, host)
);
}
fn detect_host_glibc() -> Option<GlibcVersion> {
let getconf = std::process::Command::new("getconf")
.arg("GNU_LIBC_VERSION")
.output()
.ok()
.filter(|output| output.status.success())
.and_then(|output| String::from_utf8(output.stdout).ok())
.and_then(|output| parse_glibc_version(&output));
if getconf.is_some() {
return getconf;
}
std::process::Command::new("ldd")View on GitHub (pinned to 0c42157ee5)
Solutions
- Install from source on this host: `cargo install codewhale-cli --locked` (as the error message instructs)
- Upgrade the host to a distribution whose glibc meets or exceeds the required version shown in the message
- As a last resort set CODEWHALE_SKIP_GLIBC_CHECK=1 to bypass the preflight — the binary will likely still fail at exec with a loader error, at your own risk
- If you release your own builds, build Linux GNU assets against an older glibc baseline or add a musl/static asset (the follow-up named in the message)
Example fix
# before (Ubuntu 22.04, glibc 2.35) $ codewhale update Prebuilt Codewhale asset `...gnu.tar.gz` requires GLIBC_2.39 ... # after $ cargo install codewhale-cli --locked # or: CODEWHALE_SKIP_GLIBC_CHECK=1 codewhale update # not recommended
Defensive patterns
Strategy: fallback
Validate before calling
// Pre-check host glibc before offering a prebuilt update:
let host = std::process::Command::new("getconf")
.arg("GNU_LIBC_VERSION")
.output().ok()
.filter(|o| o.status.success())
.and_then(|o| String::from_utf8(o.stdout).ok());
// parse "glibc 2.35" and compare against the release's required baseline;
// if host < required, skip the prebuilt path and build from source. Try / catch
match install_prebuilt_with_glibc_preflight(bytes, asset).await {
Ok(()) => Ok(()),
Err(e) if e.to_string().contains("requires GLIBC_") => {
// expected on old distros: fall back to source install, do not bypass blindly
run_cargo_install_locked().await
}
Err(e) => Err(e),
} Prevention
- On LTS distros, prefer `cargo install codewhale-cli --locked` over prebuilt updates
- Base containers on distros at least as new as the release build baseline
- Never set CODEWHALE_SKIP_GLIBC_CHECK=1 in automation; the exec will still fail
When it happens
Trigger: Running the updater on an older glibc distro (e.g. Ubuntu 22.04 / glibc 2.35, Debian 11) when the release asset was linked against a newer baseline (e.g. Ubuntu 24.04 / glibc 2.39); host detection succeeds and host < required. Not triggered on non-Linux, when glibc_check_disabled() is true, or when no GLIBC_x.y symbols are found (musl/static assets).
Common situations: Long-Term-Support distros lagging the build baseline; containers based on older base images; CI runners pinned to old Ubuntu images; self-update on a stable server while release engineering moved to a newer builder.
Related errors
- SHA256 mismatch for {} from {}! expected: {expected} act
- Linux riscv64 release assets are temporarily unavailable bec
- release redirect did not resolve to a tag URL: {final_url}
- failed to fetch release redirect from {url}: HTTP {status} {
- failed to install new binary at {}: {}
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/9949c979bb514126.
Report an issue: GitHub.