[BUG] illegal hardware instruction, please compile without the AVX2 requirement

Resolved 💬 24 comments Opened Aug 15, 2025 by diwu-sf Closed Jan 25, 2026
💡 Likely answer: A maintainer (ant-kurt, collaborator) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [X] Anthropic API
  • Claude CLI version: 1.0.81
  • Operating System: mac 12.7.6
  • Terminal: iterm2

Bug Description

Claude native install has CPU hardware instruction problem:

claude --version
[1]    36152 illegal hardware instruction

Macbook is Retina 15 early 2013, cpu is Intel (3635QM)
This CPU does NOT have AVX2 / BMI2 / FMA support

Steps to Reproduce

  1. Use older intel macbook without AVX2 instructions
  2. Install claude code via npm
  3. Do native install, try to run, and hit error

Expected Behavior

It should not crash on unknown cpu instruction

Actual Behavior

Crashes due to unknown instruction

Additional Context

Claude code native build is not that CPU intensive, so I don't see why it would need to be compiled with AVX2 requirement. In Rust, please compile with target RUSTFLAGS="-C target-cpu=x86-64" and this should fix it by going back to the normal baseline x86-64 instructions

View original on GitHub ↗

24 Comments

ant-kurt collaborator · 11 months ago

@diwu-sf can you see if this repros in version 1.0.69 ?

diwu-sf · 11 months ago
(base) ➜  Projects claude install 1.0.69

✔  Claude Code successfully installed!

  Version: 1.0.69

  Location: ~/.local/bin/claude


  Next: Run claude --help to get started
(base) ➜  Projects ~/.local/bin/claude --version
[1]    87076 illegal hardware instruction  ~/.local/bin/claude --version

similar problem, is the build machine running with target-cpu=native?

ant-kurt collaborator · 11 months ago

This should be working better in upcoming release 1.0.84 - likely rolling out Monday

diwu-sf · 11 months ago

@ant-kurt this is still happening with 1.0.84.
For reference the NPM version works fine, even the ripgrep binary from the npm install works fine.

ant-kurt collaborator · 11 months ago

Hmm - can you try running v1.0.84 with env var USE_BUILTIN_RIPGREP=0 to see if that isolates the problem?

kepoorz · 11 months ago

oo, same thing happening with me
Apple M1 Pro Sonoma 14.7.6(23H626)

i got this illegal instruction when installing with native

curl -fsSL https://claude.ai/install.sh | bash
Setting up Claude Code...
bash: line 142:  1399 Illegal instruction: 4  "$binary_path" install ${TARGET:+"$TARGET"}

then i went to brew cask, and installment passed but i couldn't boot it after installment... here is the log

brew install --cask claude-code
==> Downloading https://formulae.brew.sh/api/cask.jws.json
==> Caveats
Claude Code's auto-updater installs updates to `~/.local/bin/claude` and
not to Homebrew's location. It is recommended to disable the auto-updater
with either `DISABLE_AUTOUPDATER=1` or
`claude config set -g autoUpdates false` and use
`brew upgrade --cask claude-code`.

==> Downloading https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-release
Already downloaded:
==> Installing Cask claude-code
==> Linking Binary 'claude' to '/usr/local/bin/claude'
🍺  claude-code was successfully installed!
==> No outdated dependents to upgrade!

claude 
Job 1, 'claude' terminated by signal SIGILL (Illegal instruction)

npm version worked fine with me before too.

diwu-sf · 10 months ago

@ant-kurt version 1.0.86 native still has trouble on that intel macbook without the avx2

Env var USE_BUILTIN_RIPGREP=0 does not help

MysticTaCo · 8 months ago

I have the same issue with native install script - Mac Mini 4,1 - Linux Mint 22.2 Zara
Tried setting USE_BUILTIN_RIPGREP=0, with no impact
npm install succeeds, and claude code works properly

neok · 8 months ago

same issue on mac pro m1

illegal hardware instruction claude

Calvin0125 · 8 months ago

Not exactly the same issue as the original post but I am getting Illegal instruction: 4 when I run the claude command after installing via Homebrew. I tried installing via curl and got bash: line 142: 2857 Illegal instruction: 4 "$binary_path" install ${TARGET:+"$TARGET"}. I am on a 2021 Macbook Pro with Apple M1 Max chip and Sonoma 14.6.1.

Update:

Somehow I was running an intel shell on my M1 mac. To fix this I ran chsh -s /bin/zsh. Then I reinstalled homebrew, ensuring it was the ARM version installed in /opt/homebrew. Then I reinstalled Claude and deleted the old Claude at /usr/local/bin/claude. This is not a bug with Claude, I'm just leaving this here in case someone else has a similar issue.

cx2768279 · 7 months ago

arch -arm64 brew install --cask claude-code

My problem has been solved

github-actions[bot] · 6 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

lekhanh1234 · 6 months ago

on MacOS M1

first i installed with curl -fsSL https://claude.ai/install.sh | bash and got this error:

Setting up Claude Code...
./install-claude.sh: line 142: 41806 Illegal instruction: 4  "$binary_path" install ${TARGET:+"$TARGET"}

then i successfully installed with arch -arm64 brew install --cask claude-code, but when run claude command, got this error

[1]    62886 illegal hardware instruction  claude

finally, i uninstalled and installed via npm install -g @anthropic-ai/claude-code. now, it worked fine

github-actions[bot] · 5 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

marcindulak · 5 months ago

This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

26tajeen · 5 months ago

Still happening! On a circa 2012 Mac Mini

CPU: Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
AVX flags:
AVX1.0
vinest@Pippin-190 bi

UNIXTCPIP · 5 months ago

same here on Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz
claude --version
Illegal instruction (core dumped)

26tajeen · 5 months ago

@UNIXTCPIP you’re using for moltbot?

andrewfb · 5 months ago

Seeing the same, illegal instructions on late 2013 Mac Pro, 2.7 GHz 12-Core Intel Xeon E5. Manifests with both curl install and brew.

UNIXTCPIP · 5 months ago

to make it clear, npm install works fine the problem is with the native install. please add support for older CPUs.

lobanov-k · 5 months ago

Have the same issue on MacBook Pro 13-inch M1.

onegray · 5 months ago

Same on Intel Mac Pro

Jachimo · 5 months ago

Verified that this is still happening on a Mac Pro 3,1 running Ubuntu 22.04 LTS.

I can install the NPM version, but I can't install the native version because it fails when it tries to run the downloaded binary, and the VS Code extension also fails.

github-actions[bot] · 5 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.