2014-03-31 42 views
3

我最近安裝了node和npm來試用它,但是在模塊安裝過程中,它卡在它所依賴的ctags軟件包上。試圖只安裝ctags導致了一個奇怪的錯誤,我找不到解決方案。從npm安裝ctags:沒有這樣的選項--no-parallel

[email protected]:~/test/node-ctags$ npm install 
npm http GET https://registry.npmjs.org/grunt 
npm http GET https://registry.npmjs.org/nan/0.8.0 
npm http GET https://registry.npmjs.org/bindings 
npm http GET https://registry.npmjs.org/grunt-contrib-coffee 
npm http GET https://registry.npmjs.org/event-stream 
npm http GET https://registry.npmjs.org/grunt-shell 
npm http GET https://registry.npmjs.org/node-gyp 
[...] 

> [email protected] install /home/henje/test/node-ctags 
> node-gyp rebuild 

Usage: gyp_main.py [options ...] [build_file ...] 

gyp_main.py: error: no such option: --no-parallel 
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 2 
gyp ERR! stack  at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:340:16) 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:98:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:797:12) 
gyp ERR! System Linux 2.6.36.4-vs2.3.0.36.39-nc 
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /home/henje/test/node-ctags 
gyp ERR! node -v v0.10.26 
gyp ERR! node-gyp -v v0.13.0 
gyp ERR! not ok 

npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] install script. 
npm ERR! This is most likely a problem with the ctags package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  node-gyp rebuild 
npm ERR! You can get their info via: 
npm ERR!  npm owner ls ctags 
npm ERR! There is likely additional logging output above. 
npm ERR! System Linux 2.6.36.4-vs2.3.0.36.39-nc 
npm ERR! command "node" "/usr/local/bin/npm" "install" 
npm ERR! cwd /home/henje/test/node-ctags 
npm ERR! node -v v0.10.26 
npm ERR! npm -v 1.4.6 
npm ERR! code ELIFECYCLE 
npm ERR! 
npm ERR! Additional logging details can be found in: 
npm ERR!  /home/henje/test/node-ctags/npm-debug.log 
npm ERR! not ok code 0 

我不確定這是一個普遍問題還是隻是。我嘗試了npm install ctags以及從github克隆。我也檢查過,如果我有最近的gcc等gyp,並沒有想法離開。我很欣賞任何答案。

回答

4

我在嘗試安裝pm2模塊時也遇到了這個問題。 作爲一種變通方法,去除GYP解決了這個問題對我來說:

sudo易於得到刪除GYP

這裏本身就是PM2庫中列出的問題:https://github.com/Unitech/pm2/issues/434