国内服务器安装 Nvm 发表于 2024-09-10 更新于 2026-01-22 阅读次数: Valine: 系统:腾讯云 Ubuntu20.04.1 LTS 软件:Nvm v0.40.1 安装 Nvm12345678910111213141516sudo apt update# 无法访问github,使用gitee镜像git仓库# git clone https://github.com/nvm-sh/nvm.gitgit clone https://gitee.com/taohel/nvm.git# 进入目录并安装cd nvm ./install.sh # 应用环境变量source ~/.bashrc# 安装完成nvm -v Nvm 设置源并安装 Node.js12345678# nvm 修改源export NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node/# 安装 node.js 20^nvm install 20# npm 修改源npm config set registry https://registry.npmmirror.com