Hmbown/CodeWhale · error · Error

Prebuilt Codewhale Linux binaries require GLIBC_

Error message

Prebuilt Codewhale Linux binaries require GLIBC_${formatVersion(required)}, but this system does not appear to provide GNU libc.\n\nThe Linux x64 release asset is a static (musl) build that runs on any glibc,\nbut the Linux arm64 asset is a GNU libc build linked against\nUbuntu 24.04/glibc 2.39, which Ubuntu 22.04 (glibc 2.35) cannot run.\n\n${buildFromSourceHint()}\n\nSet CODEWHALE_SKIP_GLIBC_CHECK=1 to bypass this check at your own risk.

What it means

preflightGlibc() checks that the host provides GNU libc at all before allowing a prebuilt Linux binary that needs it. detectHostGlibc() returned null (no GLIBC_ symbols found), so the installer cannot verify the required GLIBC_2.39 (arm64 asset) is satisfiable and refuses to proceed.

Solutions

  1. Run on a glibc-based distro (Debian/Ubuntu/RHEL family), or use the static musl x64 asset (x64 only)
  2. Set CODEWHALE_SKIP_GLIBC_CHECK=1 to bypass at your own risk
  3. Build from source using the hint printed in the error message

Example fix

// before
npm install codewhale
// after (musl host, conscious bypass)
CODEWHALE_SKIP_GLIBC_CHECK=1 npm install codewhale
Defensive patterns

Strategy: fallback

Validate before calling

const { detectHostGlibc } = require("./scripts/preflight-glibc.js");
const isLinuxArm64 = process.platform === "linux" && process.arch === "arm64";
if (isLinuxArm64 && !detectHostGlibc() && process.env.CODEWHALE_SKIP_GLIBC_CHECK !== "1") {
  console.warn("musl/non-glibc host: arm64 prebuilt will not run; plan to build from source");
}

Try / catch

try { await ensureBinary(); } catch (e) { if (/does not appear to provide GNU libc/.test(e.message)) { buildFromSource(); } else throw e; }

Prevention

When it happens

Trigger: Running the installer (via ensureBinary or adoptExistingBinaryIfValid) on Linux where the arm64 GNU build is required and detectHostGlibc() finds no glibc — e.g. musl-based systems like Alpine.

Common situations: Alpine Linux / musl containers running npm install; minimal distros without libc symbol lookup support; CI images based on non-glibc libc implementations.

Understand the failure class

Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15). Data as JSON: /api/errors/d061488e148f4bd5. Report an issue: GitHub.

Appendix: source

Thrown at npm/codewhale/scripts/preflight-glibc.js:127

    "Set CODEWHALE_SKIP_GLIBC_CHECK=1 to bypass this check at your own risk.",
  ].join("\n");
}

function preflightGlibc(filePath) {
  if (!isLinux()) return;
  if (skipGlibcCheck()) {
    return;
  }

  const required = detectBinaryRequiredGlibc(filePath);
  if (!required) {
    // Statically linked / musl binary, or no GLIBC_* version dependencies present.
    return;
  }

  const host = detectHostGlibc();
  if (!host) {
    throw new Error(glibcCompatibilityMessage(required, null));
  }

  if (compareVersion(host, required) < 0) {
    throw new Error(glibcCompatibilityMessage(required, host));
  }
}

module.exports = {
  preflightGlibc,
  detectHostGlibc,
  detectBinaryRequiredGlibc,
  // exported for tests
  _internal: {
    parseVersion,
    compareVersion,
    formatVersion,
    glibcCompatibilityMessage,
    skipGlibcCheck,

View on GitHub (pinned to 433685b202)