尝试安装pm2时出错

我想在我的MAC OS版本10.8.5上安装pm2。 但是当我安装它。

我在我的MAC上安装了XCODE 5.1.1。 但即使这样做后,我正在得到gyp的ERR! 堆栈错误:找不到:make“.IS不是GNU make自带的XCODE,应该是理想的工作。

尝试安装时请看下面的错误。

 Rajeshs-MacBook-Pro:〜rajesh $ npm install pm2

 > fsevents@0.3.1 install / Users / rajesh / node_modules / pm2 / node_modules / chokidar / node_modules / fsevents
 > node-gyp重build

 child_process:customFds选项已弃用,请改用stdio。
 - 

同意Xcode / iOS许可证需要pipe理员权限,请通过sudo以root身份重新运行。



 gyp ERR! build立错误 
 gyp ERR! 堆栈错误:找不到:make
 gyp ERR! 堆栈在F(/Users/rajesh/.nvm/v0.11.14/lib/node_modules/npm/node_modules/which/which.js:43:28)
 gyp ERR!  E(/Users/rajesh/.nvm/v0.11.14/lib/node_modules/npm/node_modules/which/which.js:46:29)
 gyp ERR! 栈/Users/rajesh/.nvm/v0.11.14/lib/node_modules/npm/node_modules/which/which.js:57:16
 gyp ERR! 在Object.oncomplete堆栈(evalmachine.:93:15)
 gyp ERR! 系统达尔文12.5.0
 gyp ERR! 命令“node”“/Users/rajesh/.nvm/v0.11.14/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js”“rebuild”
 gyp ERR!  cwd / Users / rajesh / node_modules / pm2 / node_modules / chokidar / node_modules / fsevents
 gyp ERR!  node -v v0.11.14
 gyp ERR!  node-gyp -v v1.0.2
 gyp ERR! 不好 
 npm WARN可选dep失败,继续fsevents@0.3.1
 pm2@0.12.1 node_modules / pm2
 ├──ikt@0.0.0
 ├──json-stringify-safe@5.0.0
 ├──commander@2.4.0
 ├──eventemitter2@0.4.14
 ├──colors@0.6.2
 ├──cli-table@0.3.0
 ├──pidusage@0.1.0
 ├──cron@1.0.5
 ├──async@0.9.0
 ├──isbinaryfile@2.0.2
 ├──vizion@0.2.1
 ├──axm@0.2.24
 ├──shelljs@0.3.0
 ├──moment@2.8.4
 ├──debug@2.1.0(ms@0.6.2)
 ├──pm2-deploy@0.1.2(tv4@1.0.18)
 ├──nssocket@0.5.1(lazy@1.0.11)
 ├──pm2-axon-rpc@0.3.6(commander@1.5.5)
 ├──coffee-script@1.8.0(mkdirp@0.3.5)
 ├──pm2-rpc-fallback@3.0.9(axon@1.0.0,commander@1.0.5)
 ├──pm2-multimeter@0.1.2(charm@0.1.2)
 ├──chalk@0.5.1(escape-string-regexp@1.0.2,ansi-styles@1.1.0,supports-color@0.2.0,has-ansi@0.1.0,strip-ansi@0.3.0 )
 ├──punt@2.2.0(amp-message@0.1.2)
 ├──pm2-axon@2.0.7(amp-message@0.1.2,escape-regexp@0.0.1,configurable@0.0.1,amp@0.3.1,debug@2.0.0)
 ├──pm2-logs@0.1.1(blessed@0.36,pm2-interface@1.1.0,chalk@0.4.0)
 └──chokidar@0.10.9(async-each@0.1.6,readdirp@1.1.0)

看来你需要打开Xcode并首先接受用户协议。

其次,当你打开xcode时,你必须确保你也安装了命令行工具:进入Preferences – > Downloads ,然后安装Command Line Tools

正如@ mscdex所述:“同意Xcode / iOS许可证需要pipe理员权限,请通过sudo以root身份重新运行。 意味着尝试打开XCode并接受用户协议。 更新鲍尔依赖关系时遇到类似的问题。 我接受了新的协议,然后解决了。