2016-05-18 130 views
11

我想在我的Ubuntu LTS v16.4安装哟,但我得到这个错误:错误而安装自耕农

npm WARN deprecated [email protected]: this package has been reintegrated into npm and is now out of date with respect to npm 
npm ERR! Linux 4.4.0-22-generic 
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "yo" 
npm ERR! node v6.2.0 
npm ERR! npm v3.9.0 
npm ERR! path /usr/local/lib/node_modules/yo/lib/cli.js 
npm ERR! code ENOENT 
npm ERR! errno -2 
npm ERR! syscall chmod 

npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/yo/lib/cli.js' 
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/yo/lib/cli.js' 
npm ERR! enoent This is most likely not a problem with npm itself 
npm ERR! enoent and is related to npm not being able to find a file. 
npm ERR! enoent 

npm ERR! Please include the following file with any support request: 
npm ERR!  /home/momor1/npm-debug.log 

正如你看到的,我有最新的NPM和的NodeJS,我在根模式,所以我仍然不明白它为什么抛出这个错误。任何帮助,请:)

+0

http://stackoverflow.com/q/17990647/297087 – Salil

+0

我尝试了@Salil –

+0

好吧,我也越来越相同的错误:(,请让我知道,如果你固定的问题。 – Salil

回答

12

看来,当您试图安装最新版本,这是今天发布(2016年4月18日)出现此错误:1.8.2

请尝试安装以前版本:

sudo npm install -g [email protected] 

这现在对我有效。使用OS X El Capitan v10.11.2,节点4.4.4和npm 3.9.0在我的开发人员机器上使用OS X 10.11.5进行测试。

+0

它还是一样的对我来说实际上.. –

+1

这对我有用。 –

+0

这对我有效。 @ Kob_24首先尝试'npm cache clean'?我能够在我的构建服务器上确认问题是在yo软件包从1.8.1升级到1.8.2时开始的。 – OnResolve