[BUG] native install fails with EINVAL: invalid argument, copyfile '~/.cache/claude/staging/1.0.123/claude' -> ...
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?
When installing the native version of claude-code on Ubuntu 22.04.5 I get an error from copyfile.
Apparently, the installation aborts, because when I type the command 'claude' in the terminal, I get "command not found".
I tried to remove all relevant files and directories and try again, but got the same error. Here is the command I used to remove leftovers from a failed install:
rm -rf ~/.cache/claude ~/.local/share/claude ~/.claude*
After manually copying '~/.cache/claude/staging/1.0.123/claude' to '~/bin', I can run 'claude', but 'claude doctor' complains: "Warning: Running native installation but config install method is 'unknown'". Also, this setup will probably fail when claude code tries to update to a new version.
What Should Happen?
Claude Code native should get installed in ~/.local/share/claude and runnable.
Error Messages/Logs
The error message is:
✘ Installation failed
EINVAL: invalid argument, copyfile '/home/user/.cache/claude/staging/1.0.123/claude' -> '/home/user/.local/share/claude/versions/1.0.123.tmp.1129780.1758754356342'
Try running with --force to override checks
Steps to Reproduce
Try to install native Claude Code as suggested in documentation:
curl -fsSL https://claude.ai/install.sh | bash
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
1.0.123 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Xterm
Additional Information
$ claude doctor
Diagnostics
└ Currently running: native (1.0.123)
└ Path: /home/user/bin/claude
└ Invoked: /home/user/claude-bin/claude
└ Config install method: unknown
└ Auto-updates enabled: default (true)
└ Search: OK (bundled)
Warning: Running native installation but config install method is 'unknown'
Fix: Run claude install to update configuration
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
This issue has 12 comments on GitHub. Read the full discussion on GitHub ↗