2013-08-06 71 views
0

我想通过npm安装业力,但它保持超时。我用curl下载了该文件并手动安装了phantomjs,但当我尝试安装业力时,npm仍会引发错误。我试图将该文件复制到npm所保存的路径中,但这不起作用(运行安装也会删除我创建的目录)。通过npm安装业力超时phantomjs

这是我运行:

sudo npm install -g karma 

这是发生了什么:

> [email protected] install /usr/local/lib/node_modules/karma-phantomjs-launcher/node_modules/phantomjs 
> node install.js 

Downloading http://phantomjs.googlecode.com/files/phantomjs-1.9.1-linux-x86_64.tar.bz2 
Saving to /usr/local/lib/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/phantomjs/phantomjs-1.9.1-linux-x86_64.tar.bz2 

events.js:77 
     throw er; // Unhandled 'error' event 
      ^
Error: connect ETIMEDOUT 
    at errnoException (net.js:947:11) 
    at Object.afterConnect [as oncomplete] (net.js:938:19) 
npm ERR! weird error 8 
npm ERR! not ok code 0 

我觉得很奇怪的是,它仍然要安装phantomjs即使我手动安装它在我系统。我可以做些什么来完成这项工作,我已经下载了这个文件,甚至安装了它,它似乎正在工作。出于某种原因,npm只是不喜欢它。

回答

1

固定..有必要做sudo n stable而不是sudo n latest - 显然无法安装与node.js的

的最新版本因果报应