sh: 1: node: not found

在装nodejs的npm包的时候报如下错误:

sh: 1: node: not found npm WARN This failure might be due to the use of legacy binary 

查资料发现,新版本的nodejs,已经将原来/usr/bin/node改成/usr/bin/nodejs了。所以报如上错误。

解决方案如下:

sudo apt-get install nodejs-legacy

参考链接:

http://stackoverflow.com/questions/21168141/can-not-install-packages-using-node-package-manager-in-ubuntu

猜你喜欢

转载自hongtoushizi.iteye.com/blog/2220809