{"record":{"id":"d061488e148f4bd5","repo":"Hmbown/CodeWhale","slug":"prebuilt-codewhale-linux-binaries-require-glibc","errorCode":null,"errorMessage":"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.","messagePattern":"Prebuilt Codewhale Linux binaries require GLIBC_(.+?), 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(.+?)\\\\n\\\\nSet CODEWHALE_SKIP_GLIBC_CHECK=1 to bypass this check at your own risk\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"npm/codewhale/scripts/preflight-glibc.js","lineNumber":127,"sourceCode":"    \"Set CODEWHALE_SKIP_GLIBC_CHECK=1 to bypass this check at your own risk.\",\n  ].join(\"\\n\");\n}\n\nfunction preflightGlibc(filePath) {\n  if (!isLinux()) return;\n  if (skipGlibcCheck()) {\n    return;\n  }\n\n  const required = detectBinaryRequiredGlibc(filePath);\n  if (!required) {\n    // Statically linked / musl binary, or no GLIBC_* version dependencies present.\n    return;\n  }\n\n  const host = detectHostGlibc();\n  if (!host) {\n    throw new Error(glibcCompatibilityMessage(required, null));\n  }\n\n  if (compareVersion(host, required) < 0) {\n    throw new Error(glibcCompatibilityMessage(required, host));\n  }\n}\n\nmodule.exports = {\n  preflightGlibc,\n  detectHostGlibc,\n  detectBinaryRequiredGlibc,\n  // exported for tests\n  _internal: {\n    parseVersion,\n    compareVersion,\n    formatVersion,\n    glibcCompatibilityMessage,\n    skipGlibcCheck,","sourceCodeStart":109,"sourceCodeEnd":145,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/433685b2024e7bc4c99e1e2e326bcad39b4d9d65/npm/codewhale/scripts/preflight-glibc.js#L109-L145","documentation":"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.","triggerScenarios":"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.","commonSituations":"Alpine Linux / musl containers running npm install; minimal distros without libc symbol lookup support; CI images based on non-glibc libc implementations.","solutions":["Run on a glibc-based distro (Debian/Ubuntu/RHEL family), or use the static musl x64 asset (x64 only)","Set CODEWHALE_SKIP_GLIBC_CHECK=1 to bypass at your own risk","Build from source using the hint printed in the error message"],"exampleFix":"// before\nnpm install codewhale\n// after (musl host, conscious bypass)\nCODEWHALE_SKIP_GLIBC_CHECK=1 npm install codewhale","handlingStrategy":"fallback","validationCode":"const { detectHostGlibc } = require(\"./scripts/preflight-glibc.js\");\nconst isLinuxArm64 = process.platform === \"linux\" && process.arch === \"arm64\";\nif (isLinuxArm64 && !detectHostGlibc() && process.env.CODEWHALE_SKIP_GLIBC_CHECK !== \"1\") {\n  console.warn(\"musl/non-glibc host: arm64 prebuilt will not run; plan to build from source\");\n}","typeGuard":null,"tryCatchPattern":"try { await ensureBinary(); } catch (e) { if (/does not appear to provide GNU libc/.test(e.message)) { buildFromSource(); } else throw e; }","preventionTips":["On Alpine/musl, use x64 (static musl asset) or build from source","Prefer glibc-based base images for arm64 CI","Set CODEWHALE_SKIP_GLIBC_CHECK only deliberately"],"tags":["glibc","linux","compatibility","installer"],"backgroundTag":"unsupported-platform","analyzedSha":"433685b2024e7bc4c99e1e2e326bcad39b4d9d65","analyzedAt":"2026-09-15T12:24:24.634Z","contentChangedAt":"2026-09-15T12:24:24.634Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}