Trying to install claude code on bluehost vps with "curl -fsSL https://claude.ai/install.sh | bash" freezed the machine. the curl -fsSL https://claude.ai/install.sh | bash script hanging or freezing the machine during the final stages of a Linux installation is a documented issue.
You can easily bypass the broken native script by using the traditional, highly reliable Node Package Manager (npm) installation path.
Because Bluehost VPS servers typically run standard Linux environments, installing via npm avoids the buggy shell-rewriting binary wrapper entirely. [1]
1. Install Node.js and npm (if not already present on your VPS):
sudo apt update && sudo apt install -y nodejs npm
EACCES security lockouts):mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
3. Manually add the new path to your profile file (manually doing what the frozen script failed to do):
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
4. Install Claude Code via npm:
npm install -g @anthropic-ai/claude-code
5. Turn off the buggy auto-updater (the native background auto-updater can trigger the same system freeze later on):
echo 'export DISABLE_AUTOUPDATER=1' >> ~/.bashrc
source ~/.bashrc
6. Launch and authenticate:
claude
No comments:
Post a Comment