2014-04-17 61 views
2

我试图安装pm2模块,但我正面临此错误。 OS是Ubuntu 14.04 Beta2。 Node.js版本是0.10.25,npm - 1.4.7。 我在做什么错?尝试安装nodejs pm2模块时出错

[email protected]:~/source$ sudo npm install pm2 -g 
....... 
npm http 304 https://registry.npmjs.org/fsevents 
npm http 304 https://registry.npmjs.org/bindings 
npm http 304 https://registry.npmjs.org/recursive-readdir 
npm http 304 https://registry.npmjs.org/configurable 
npm WARN optional dep failed, continuing [email protected] 

> [email protected] install /usr/lib/node_modules/pm2/node_modules/usage 
> 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/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 3.13.0-19-generic 
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" 
gyp ERR! cwd /usr/lib/node_modules/pm2/node_modules/usage 
gyp ERR! node -v v0.10.25 
gyp ERR! node-gyp -v v0.13.0 
gyp ERR! not ok 
npm http 304 https://registry.npmjs.org/escape-regexp 
npm http 304 https://registry.npmjs.org/keypress 
npm http 304 https://registry.npmjs.org/mkdirp 
npm ERR! [email protected] install: `node-gyp rebuild` 
npm ERR! Exit status 1 
+0

你有没有通过'sudo apt-get install build-essential'为Ubuntu安装_build-essential_包? – Bulkan

+1

是的,建立必要的安装。 –

回答