`node-gyp rebuild` 在 `base64@2.1.0 install` 上出现错误

3
在MAC上运行'sudo npm install'时,我遇到了有关node-gyp rebuild的错误,该错误出现在base64@2.1.0 install上。有什么方法可以解决这个问题吗?请帮忙。
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 69
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 13.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/jepeng/Documents/huron/wx2-admin-web-client/node_modules/base64
gyp ERR! node -v v0.10.32
gyp ERR! node-gyp -v v1.0.1
gyp ERR! not ok 

npm ERR! base64@2.1.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the base64@2.1.0 install script.
npm ERR! This is most likely a problem with the base64 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 base64
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 13.4.0
npm ERR! command "node" "/usr/local/bin/npm" "install"
npm ERR! cwd /Users/jepeng/Documents/huron/wx2-admin-web-client
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0

你解决了这个错误吗?同样的错误(node v0.12.2,npm v2.7.4),OS X Yosemite。 - HdN8
2个回答

0

我通过使用旧版本的Node v0.10.40解决了这个问题。


0

我遇到了类似的问题。 按照以下步骤在MacOS highSierra 10.13上修复它:

  1. 下载并安装了适用于xcode的命令行工具(MacOS 10.13)。您可以从 "https://developer.apple.com/download/more/" 下载。
  2. 从应用商店安装了xcode 10.0。打开xcode并通过初始启动期间的常规配置进行操作。
  3. 之后出现了“xcode-select”路径问题,如上述描述所述。运行命令“xcode-select --print-path”,显示的路径为'/ Library/Developer/CommandLineTools',因此我尝试了“xcode-select --reset”,之后路径更改为“/Applications/Xcode.app/Contents/Developer”。之后,构建开始无任何问题。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接