未能安装twitter bootstrap node.js依赖关系(在Ubuntu上)

我已经从官方网站下载了Bootstrap 3.1.1源文件,当试图在bootstrap/目录下运行npm install时,出现错误,这是在从站点执行bootstrap安装程序的指导下进行的。

我在Ubuntu 14.04平台上使用npm 1.3.10从发行版库安装,并且可以成功运行npm install -g grunt-cli

但是,当我试图从bootstrap目录中sudo npm install时,发现一串成功的GET消息,然后终止此错误:

 npm http 304 https://registry.npmjs.org/proto-list > phantomjs@1.9.7-4 install /home/cboettig/Documents/code/thirdparty/bootstrap/node_modules/grunt-contrib-qunit/node_modules/grunt-lib-phantomjs/node_modules/phantomjs > node install.js 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 npm ERR! weird error 1 npm ERR! not ok code 0 

我已经咨询了警告中提到的README.Debian ,这似乎只是说Debian平台需要调用nodejs而不是node来避免命名空间冲突。 我不确定如何validation这是否是一个问题。

我发现错误信息, weird error 1也不是特别有用。

如何安装这个项目干净没有错误?

运行这些命令

 sudo add-apt-repository ppa:chris-lea/node.js sudo apt-get update sudo apt-get install python-software-properties python g++ make nodejs 

从存储库安装node.js。

安装nodejs-legacy,这将修复错误