如果是用sudo apt-get install nodejs命令安装的nodejs,
ubuntu在安装的时候为了避免包的冲突,将node的命令操作改成nodejs,而不是node。
解决方法:创建二者之间的符号链接
sudo ln -s /usr/bin/nodejs /usr/bin/node
如果是用sudo apt-get install nodejs命令安装的nodejs,
ubuntu在安装的时候为了避免包的冲突,将node的命令操作改成nodejs,而不是node。
解决方法:创建二者之间的符号链接
sudo ln -s /usr/bin/nodejs /usr/bin/node