Skip to content

v2.1.113+ broken on Termux/Android: native binary requires glibc, no JS fallback #50270

Description

@tpdhd

Summary

Starting with v2.1.113, Claude Code switched from a JavaScript entry point (cli.js) to a native glibc Linux binary (bin/claude.exe). This completely breaks Claude Code on Termux (Android), where:

  • process.platform reports android, not linux
  • Android's kernel rejects ET_EXEC glibc ELF binaries (unexpected e_type: 2)
  • There is no glibc on Android/Termux (it uses Bionic libc)

v2.1.112 (last JS-based version) works perfectly.

Environment

  • Device: Pixel 9, Android 14 (non-rooted)
  • Termux: latest from F-Droid
  • Node.js: v22 (Termux arm64)
  • Claude Code: v2.1.113 / v2.1.114 broken, v2.1.112 works

Steps to reproduce

# On Termux
npm install -g @anthropic-ai/claude-code@latest
claude --version

Expected: Version output
Actual:

Error: claude native binary not installed.

Either postinstall did not run (--ignore-scripts, some pnpm configs)
or the platform-native optional dependency was not downloaded
(--omit=optional).

Root cause

  1. install.cjs calls process.platform → returns android → not in PLATFORMS map → skips binary install
  2. Even force-installing @anthropic-ai/claude-code-linux-arm64 and copying the binary fails because Android's kernel rejects glibc executables:
    error: "bin/claude.exe" has unexpected e_type: 2
    
  3. Running via patchelf or the glibc ld-linux-aarch64.so.1 loader also fails (Could not find a PHDR: broken executable?)
  4. Running via proot-distro works (proot-distro login ubuntu -- /path/to/claude --version) but is too slow for interactive use

Workaround

Pin to the last JS-based version:

npm install -g @anthropic-ai/claude-code@2.1.112

Suggested fix

One or more of:

  • Add android-arm64 platform support with a statically-linked or Bionic-compatible binary
  • Keep the JS fallback (cli.js / cli-wrapper.cjs) functional as a real fallback, not just an error message
  • Map android → linux in platform detection (won't fix the glibc issue alone, but would help if a compatible binary is provided)

Impact

All Termux users on Android are locked out of updates. Termux is one of the few ways to run Claude Code on mobile — a non-trivial use case for developers on the go.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions