在debian使用npm安装出错

在一台Debian机器上部署Laravel,`nmp install`的时候总出错,错误如下 “` sh: 1: node: not found npm WARN This failure might be due to the use of legacy binary “node” npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian “` `nodejs`一定是通过`apt-get`安装过了,查过之后就是还有一些老旧的package在使用`node`,所以需要安装一下`apt-get install nodejs-legacy`,之后就OK了 [ref](http://stackoverflow.com/questions/21168141/can-not-install-packages-using-node-package-manager-in-ubuntu)