【发布时间】:2021-02-08 19:43:41
【问题描述】:
我正在尝试在卸载 nvm(以 root 身份)后重新安装它(以新用户身份),但显然它不起作用。请告诉我如何解决这个问题。
user@site-beta:~/htdocs$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13527 100 13527 0 0 105k 0 --:--:-- --:--:-- --:--:-- 105k
You have $NVM_DIR set to "/root/.nvm", but that directory does not exist. Check your profile files and environment.
编辑:我的建议是放弃 NVM 并正常安装节点,因为显然 NVM 并没有让它变得更容易。
【问题讨论】:
-
NVM_DIR变量设置在您的 shell 配置文件中的某个位置(.bashrc 或 .bash_profile)。删除来源. /root/.nvm/nvm.sh的行,然后在新的 shell 中再次尝试安装。
标签: node.js ubuntu installation nvm