无法通过 SSH 加载 nvm 命令

无法通过 SSH 加载 nvm 命令

我知道还有很多类似的问题,但我仍然无法让它发挥作用。

如果我尝试跑步nvm install node,一切又会重新开始运转。

ubuntu@*:~$ node
The program 'node' can be found in the following packages:
 * node
 * nodejs-legacy
Try: sudo apt-get install <selected package>
ubuntu@*:~$ npm
The program 'npm' is currently not installed. You can install it by typing:
sudo apt-get install npm
ubuntu@*:~$ forever
forever: command not found
ubuntu@*:~$ source ~/.profile
ubuntu@*:~$ source ~/.bash_profile
-bash: /home/ubuntu/.bash_profile: No such file or directory
ubuntu@*:~$ nvm install node
v5.5.0 is already installed.
Now using node v5.5.0 (npm v3.7.1)
ubuntu@*:~$ which npm
/home/ubuntu/.nvm/versions/node/v5.5.0/bin/npm
ubuntu@*:~$ which node
/home/ubuntu/.nvm/versions/node/v5.5.0/bin/node
ubuntu@*:~$ which forever
/home/ubuntu/.nvm/versions/node/v5.5.0/bin/forever
ubuntu@*:~$

我也尝试过,nvm alias default 5.5.0 但没有成功:(

如果有人能帮忙那就太好了!

答案1

我意识到我可以通过增加nvm use 5.5.0我的.bashrc

相关内容