Skip to content

[BUG] Native installer installs x86_64 binary on Apple Silicon (arm64) Macs #22117

Description

@mikeschinkel

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

When installing Claude Code via the native installer (curl -fsSL https://claude.ai/install.sh | bash -s latest) on an Apple Silicon Mac, the installed binary is x86_64 instead of arm64.

The install script correctly detects arm64 and downloads the correct darwin-arm64 binary from GCS. However, after the script completes, the binary at ~/.local/bin/claude is x86_64.

This causes a Bun warning on every launch:

warn: CPU lacks AVX support, strange crashes may occur. Reinstall Bun or use *-baseline build:
  https://github.com/oven-sh/bun/releases/download/bun-v1.3.5/bun-darwin-x64-baseline.zip

What Should Happen?

The installer should install the arm64 binary on Apple Silicon Macs. Running file ~/.local/bin/claude should show Mach-O 64-bit executable arm64.

Error Messages/Logs

$ claude
warn: CPU lacks AVX support, strange crashes may occur. Reinstall Bun or use *-baseline build:
  https://github.com/oven-sh/bun/releases/download/bun-v1.3.5/bun-darwin-x64-baseline.zip

$ file ~/.local/bin/claude
/Users/mikeschinkel/.local/bin/claude: Mach-O 64-bit executable x86_64

$ uname -m
arm64

Steps to Reproduce

  1. On an Apple Silicon Mac (M1/M2/M3/M4), confirm architecture:
    uname -m  # should return arm64
  2. Remove any existing installation:
    rm -rf ~/.claude ~/.local/bin/claude
    npm uninstall -g @anthropic-ai/claude-code  # if previously installed via npm
  3. Install via native installer:
    curl -fsSL https://claude.ai/install.sh | bash -s latest
  4. Check the installed binary architecture:
    file ~/.local/bin/claude
  5. Observe it shows x86_64 instead of arm64

Claude Model

None

Is this a regression?

I don't know

Last Working Version

No response

Claude Code Version

2.1.27

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Root cause analysis:

The bug is not in install.sh — that script downloads the correct arm64 binary. The problem occurs when the script executes:

"$binary_path" install ${TARGET:+"$TARGET"}

This claude install subcommand installs the x86_64 binary instead of copying itself.

Workaround:

Manually download and replace the binary after installation:

curl -fsSL -o ~/.local/bin/claude "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.27/darwin-arm64/claude"
chmod +x ~/.local/bin/claude

Additional Information

  • Hardware: M4 Mac Mini
  • Verified the GCS bucket contains correct arm64 binary:
    curl -fsSL -o /tmp/claude-arm64-test "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.27/darwin-arm64/claude"
    file /tmp/claude-arm64-test
    # Returns: Mach-O 64-bit executable arm64
  • The bundled Bun at ~/.claude/local/bin/bun is also x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions