当前位置: 技术问答>linux和unix
ubuntu 系统执行npm install 出错
来源: 互联网 发布时间:2017-05-17
本文导语: 最近在学习angularjs,从官方网站上的教程 https://code.angularjs.org/1.3.0-beta.7/docs/tutorial, 先复制代码到本地: git clone --depth=14 https://github.com/angular/angular-phonecat.git 然后,安装nodejs, 再,在本地angular-phonecat目录下...
最近在学习angularjs,从官方网站上的教程 https://code.angularjs.org/1.3.0-beta.7/docs/tutorial,
先复制代码到本地: git clone --depth=14 https://github.com/angular/angular-phonecat.git
然后,安装nodejs,
再,在本地angular-phonecat目录下执行:npm install 下载依赖就报错了,如下
> phantomjs@1.9.7-5 install /home/zhaozb/angular-phonecat/node_modules/karma-phantomjs-launcher/node_modules/phantomjs
> node install.js
Downloading http://cdn.bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2
Saving to /tmp/phantomjs/phantomjs-1.9.7-linux-i686.tar.bz2
events.js:72
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT
at errnoException (net.js:904:11)
at Object.afterConnect [as oncomplete] (net.js:895:19)
npm ERR! phantomjs@1.9.7-5 install: `node install.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the phantomjs@1.9.7-5 install script.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.11.0-20-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/zhaozb/angular-phonecat
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/zhaozb/angular-phonecat/npm-debug.log
npm ERR! not ok code 0
截图:
先复制代码到本地: git clone --depth=14 https://github.com/angular/angular-phonecat.git
然后,安装nodejs,
再,在本地angular-phonecat目录下执行:npm install 下载依赖就报错了,如下
> phantomjs@1.9.7-5 install /home/zhaozb/angular-phonecat/node_modules/karma-phantomjs-launcher/node_modules/phantomjs
> node install.js
Downloading http://cdn.bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2
Saving to /tmp/phantomjs/phantomjs-1.9.7-linux-i686.tar.bz2
events.js:72
throw er; // Unhandled 'error' event
^
Error: connect ETIMEDOUT
at errnoException (net.js:904:11)
at Object.afterConnect [as oncomplete] (net.js:895:19)
npm ERR! phantomjs@1.9.7-5 install: `node install.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the phantomjs@1.9.7-5 install script.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.11.0-20-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/zhaozb/angular-phonecat
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/zhaozb/angular-phonecat/npm-debug.log
npm ERR! not ok code 0
截图:
|
我也遇到这个问题了,原因是:
http://cdn.bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2 这个地址连接失败了。
去这里下了手动装吧 http://download.csdn.net/detail/wxyyxc1992/6893055
http://cdn.bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-i686.tar.bz2 这个地址连接失败了。
去这里下了手动装吧 http://download.csdn.net/detail/wxyyxc1992/6893055