anthropics / anthropics/claude-code
[BUG] `protocol mismatch` error when trying to install Claude CLI
- 主要言語
- Python
- スター
- 145k
- フォーク
- 23.1k
- PR マージ指標
- PR 指標を取得中
説明
### Preflight Checklist
- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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?
* OS: Ubuntu 24.04.4
* Install command used: `bash -c "$(curl -fsSL https://claude.ai/install.sh)" -- 2.1.237`
* Steps already tried: `--force`, `--verbose`, manual download of bootstrap.sh/binary, running `claude install 2.1.237` directly with same result
* Diagnostics ruled out: confirmed glibc via `ldd --version`, no musl libraries present, no conflicting claude installs, `~/.local/bin writable`, no missing shared libraries
Version mismatch note: installer downloads latest binary (2.1.238) to install an older version (2.1.237)
The above was generated by Fin, which was otherwise completely clueless as to what the problem might be. It suggested I open an issue here. My own narrative:
I am trying to install the Claude CLI on Ubuntu 24.04.4 using `bash -c "$(curl -fsSL [https://claude.ai/install.sh)"](https://claude.ai/install.sh)%22) -- 2.1.237`. After a lengthy wait to download the installer, it immediately fails, saying `✘ Installation failed`, `protocol mismatch`, `Try running with --force to override checks`, and literally nothing else. I tried adding `--force` to the `install.sh` command and it did nothing. I eventually downloaded `bootstrap.sh`, saw it was downloading https://downloads.claude.ai/claude-code-releases/2.1.238/linux-x64/claude, and the error happened when it ran `claude-2.1.238-linux-x64 install 2.1.237`. I downloaded that file myself and tried running `claude install 2.1.237` and got the same error. I tried adding `--force` and `--verbose`, but that did not change the output any. Running the downloaded claude install without any arguments does appear to open the Claude CLI without issue, at least it gets as far as asking me if I trust the current directory.
### What Should Happen?
Claude should install successfully or at a minimum give a more helpful error message.
### Error Messages/Logs
```shell
Setting up Claude Code...
✘ Installation failed
protocol mismatch
Try running with --force to override checks
```
### Steps to Reproduce
Run `bash -c "$(curl -fsSL https://claude.ai/install.sh)" -- 2.1.237`.
### Claude Model
_No response_
### Is this a regression?
Yes, this worked in a previous version
### Last Working Version
2.1.63
### Claude Code Version
2.1.238
### Platform
Anthropic API
### Operating System
Ubuntu/Debian Linux
### Terminal/Shell
Xterm
### Additional Information
```./claude doctor
Claude Code doctor
Running: native (2.1.238)
Commit: 46283063a4c2
Platform: linux-x64
Path: /home/jcroteau/claude
Config install method: native
Search: OK (bundled)
Auto-updates: enabled
Auto-update channel: latest
Last update attempt: none recorded
Remote Control
Remote Control requires a claude.ai subscription. Run claude auth login to sign in with your claude.ai account.
- Not signed in to claude.ai
- claude.ai subscription auth not active
- Sign-in is missing the user:profile scope
1 warning found
- claude command at /home/jcroteau/.local/bin/claude missing or broken
Fix: Run claude install to repair the installation.
For a full setup checkup that can also fix issues, run /doctor in a Claude Code session.
```
```
ldd --version
ldd (Ubuntu GLIBC 2.39-0ubuntu8.8) 2.39
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
```
```
ldd claude
linux-vdso.so.1 (0x00007ffd6417f000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007d4e4cce8000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007d4e4ca00000)
/lib64/ld-linux-x86-64.so.2 (0x00007d4e4cd09000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007d4e4cce3000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007d4e4ccde000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007d4e4c917000)
```
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Start by reproducing the failure with the install.sh command on Ubuntu 24.04.4, then inspect bootstrap.sh and the downloaded 2.1.238 claude binary involved in installing 2.1.237. Compare the installer and binary version handling around the reported protocol mismatch. Done means the requested version installs successfully or the failure reports a specific actionable cause.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- bash, linux
- 領域
- cli, operating-systems
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100