[BUG] In a new WSL environment, I cannot install Claude Code.

Status Fixed / completed
Reported on v2.1.83
Maintainer reply None cached
Activity 9 comments · opened Mar 25, 2026 · closed May 6, 2026

Preflight Checklist

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

What's Wrong?

I reinstalled the WSL 1 version of Ubuntu 24.04 under Windows. So my system is clean. Executing curl -fsSL https://claude.ai/install.sh | bash returns the following:

code@W10-20240815257:~/.claude/downloads$ curl -fsSL https://claude.ai/install.sh | bash
Setting up Claude Code...
bash: line 151: /home/code/.claude/downloads/claude-2.1.83-linux-x64: cannot execute binary file: Exec format error
uname -m
x86_64

What Should Happen?

Should be able to install Claude Code successfully.

Error Messages/Logs

Setting up Claude Code...
bash: line 151: /home/code/.claude/downloads/claude-2.1.83-linux-x64: cannot execute binary file: Exec format error

Steps to Reproduce

code@W10-20240815257:~/.claude/downloads$ curl -fsSL https://claude.ai/install.sh | bash
Setting up Claude Code...
bash: line 151: /home/code/.claude/downloads/claude-2.1.83-linux-x64: cannot execute binary file: Exec format error

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.82

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

WSL (Windows Subsystem for Linux)

Additional Information

_No response_

View original on GitHub ↗

9 Comments

github-actions[bot] · 5 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/30822

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

alphakilo7 · 5 months ago

+1 for me

WSL1: 4.4.0-26100-Microsoft

Works on 2.1.81

Broken on 2.1.83 with Exec format error

As a workaround, the plugin/executable installation can be pinned to version 2.1.81 for WSL1 users.

serfriz · 5 months ago

I am having the exact same issue with WSL1. Works on 2.1.81, broken on 2.1.83 and 2.1.84 (cannot execute binary file: Exec format error))

meng-luo · 5 months ago

I encountered the same issue on WSL1. A temporary workaround is to explicitly invoke the linker to run the program:
/lib64/ld-linux-x86-64.so.2 ~/.claude/downloads/claude-2.1.85-linux-x64

CMiddleton3 · 5 months ago

I experience the same issue; the install script is hard-coded to only install the current stable version, which is broken. I must set "DISABLE_AUTOUPDATER": "1" in settings.json to stop automatic upgrades.

lrojas94 · 5 months ago

Same here fwiw

nakozak · 5 months ago

Revert to an older working version 2.1.81:

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

Would be nice if there is a CI check so we know new versions don't break our existing setups.

xiaobai2017666 · 3 months ago
curl -fsSL https://claude.ai/install.sh | bash
echo 'alias claude="/lib64/ld-linux-x86-64.so.2 ~/.claude/downloads/claude-[version]-linux-x64"' >> ~/.bashrc
source ~/.bashrc

You can use the latest version of Claude Code under WSL1 with this method. Thanks to the original poster for providing the solution.
@meng-luo

github-actions[bot] · 2 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.