一 安装 nvm, 以下方法二选一
1 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash |
二 利用nvm安装并管理nodejs
1 | $ nvm install 22 # 安装nodejs v22.22.1 |
1 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.6/install.sh | bash |
1 | $ nvm install 22 # 安装nodejs v22.22.1 |