sudo npm install错误
2017-05-02 15:32
639 查看
在执行
错误代码如下:
最终的解决方法是使用“cnpm”,可直接看最后
尝试过程:
通过n把nodejs升级到最新稳定版本
升级npm
仍然不行,修改了源,也不行。
最终通过使用cnpm,解决问题。
终端中执行:
然后再次尝试,执行
sudo npm install时发生错误
错误代码如下:
> node install.js npm ERR! Linux 3.13.0-96-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" npm ERR! node v7.8.0 npm ERR! npm v4.2.0 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! electron@1.6.6 postinstall: `node install.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the electron@1.6.6 postinstall script 'node install.js'. npm ERR! Make sure you have the latest version of node.js and npm installed. npm ERR! If you do, this is most likely a problem with the electron package, npm ERR! not with npm itself.
最终的解决方法是使用“cnpm”,可直接看最后
尝试过程:
通过n把nodejs升级到最新稳定版本
sudo npm install -g n sudo n stable
升级npm
sudo npm -g install npm
仍然不行,修改了源,也不行。
最终通过使用cnpm,解决问题。
终端中执行:
sudo npm install -g cnpm --registry=https://registry.npm.taobao.org
然后再次尝试,执行
sudo cnpm install即可。
相关文章推荐
- sudo apt-get install libopencv-dev 遇到ppa获取错误的问题
- sudo apt-get install **时,出现错误{更换介质:请把标有 “Ubuntu-Kylin 14.04 LTS _Trusty Tahr_ ...}
- Error with npm install , NPM安装错误分析
- 我在npm install express时发生如下错误
- npm install出现"Unexpected end of JSON input while parsing near"错误解决方法
- Ubuntu在执行sudo apt-get install ***出现E:Encountered a section with no Package header错误解决方法
- npm install 错误
- 制作mac安装盘 遇到错误 sudo: /Applications/Install OS X Yosemite.app/Contents/Resources/createinstallmedia: c
- 解决sudo npm install -g react-native-cli 报错问题
- npm install mongoose错误解决
- npm install 时 bower ESUDO Cannot be run with sudo 错误
- npm的Refusing to install 错误
- ubuntu常见错误--Could not get lock /var/lib/dpkg/lock解决 通过终端安装程序sudo apt-get install xxx时出错: E: Coul
- centos7中 npm install express 时Error: Cannot find module 'express'错误
- 在Ubuntu终端中使用安装命令Sudo apt-get install xxx时时出现E: 无法获得锁 /var/lib/dpkg/lock - open (11: 资源暂时不可用)的错误解决方案
- [问题解决] sudo apt-get install *** 出现“E: 无法定位软件包 ***”
- ant eclipse 错误:Specified VM install not found: type Standard VM 解决方法
- ruby gem install rails 错误解决方法
- apt-get错误:not fully install or remove解决方法