【问题标题】:Error while trying to install nodejs pm2 module尝试安装 nodejs pm2 模块时出错
【发布时间】:2017-08-31 13:30:48
【问题描述】:

我正在尝试安装 pm2 模块,但我遇到了这个错误。操作系统是 Ubuntu 14.04 Beta2。 Node.js 版本是 0.10.25,npm - 1.4.7。 我做错了什么?

halkar@halkar-nb-ubuntu:~/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 fsevents@0.2.0

> usage@0.3.9 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! usage@0.3.9 install: `node-gyp rebuild`
npm ERR! Exit status 1

【问题讨论】:

  • 你是否通过sudo apt-get install build-essential为ubuntu安装了build-essential包?
  • 是的,build-essential 已安装。

标签: node.js npm pm2


【解决方案1】:

作为一种解决方法,删除 gyp 为我解决了这个问题:

sudo apt-get remove gyp

这是 pm2 存储库中列出的问题本身: https://github.com/Unitech/pm2/issues/434

【讨论】:

    猜你喜欢
    • 2015-01-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-03-16
    • 2015-04-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多