日期:2014-05-16 浏览次数:20374 次
昨天兴致勃勃的玩了一天的node,今天开机想接着爽一把,结果提示让我安装Node,我去,昨天刚安装了,怎么还会出这样的提示?其实这真不是问题,看了一下nvm命令的帮助,so easy!
错误:(试了两次)
sunnylee@MyComputer:~$ node
The program 'node' can be found in the following packages:
* node
* nodejs
Try: sudo apt-get install <selected package>
sunnylee@MyComputer:~$ node
The program 'node' can be found in the following packages:
* node
* nodejs
Try: sudo apt-get install <selected package>
环境:Ubuntu 12.04
场景还原:
1.开机;
2.打开终端,键入命令node,出现上述错误。
错误原因:使用NVM命令(nvm use 0.11.11)选择安装过的版本, 问题即可解决。
个人博客:http://www.studyit.pw, 欢迎拍砖!
附:
NVM命令详解:
Usage:
nvm help Show this message
nvm --version Print out the latest released version of nvm
nvm install [-s] <version> Download and install a <version>, [-s] from source
nvm uninstall <version> Uninstall a version
nvm use <version> Modify PATH to use <version>
nvm run <version> [<args>] Run <version> with <args> as arguments
nvm current Display currently activated version
nvm ls List installed versions
nvm