1、Ubuntu22.04上安装NVM:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
nvm --version
2、安装node.js(LTS版本)
https://nodejs.org/en/download
nvm install 20.20.2
配置淘宝源:
npm config set registry https://registry.npmmirror.com
npm config get registry
3、通过node.js安装Claude Code:
npm install -g @anthropic-ai/claude-code
4、cc-switch下载地址:https://github.com/farion1231/cc-switch/releases
安装命令:sudo dpkg -i CC-Switch-v3.12.1-Linux-x86_64.deb