【问题标题】:NPM: The "ld: library not found for -lgcc_s.10.5" on On OS X El Capitan?NPM:在 OS X El Capitan 上的“ld: library not found for -lgcc_s.10.5”?
【发布时间】:2015-11-03 08:21:15
【问题描述】:

当我使用npm install 安装this repository 的依赖时,遇到如下错误:

> fsevents@0.3.8 install /Users/hanfeisun/Workspace/vue-webpack-example/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/fsevents
> node-gyp rebuild

  SOLINK_MODULE(target) Release/.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 15.0.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/hanfeisun/Workspace/vue-webpack-example/node_modules/webpack/node_modules/watchpack/node_modules/chokidar/node_modules/fsevents
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 
npm WARN optional dep failed, continuing fsevents@0.3.8

但是,安装仍然成功完成。当我使用npm run 时,该应用程序仍然运行良好。有人知道node-gyp rebuild 在这里做什么吗?为什么项目运行良好,即使node-gyp 在这里抛出错误?

【问题讨论】:

标签: node.js macos npm node-gyp


【解决方案1】:

我在升级到 Node 4.1.0 (OS X 10.10.5) 后遇到了这个问题,从官方包重新安装后没有任何运气。对于它的价值,这为我解决了它:

cd /usr/local/lib
sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib

(最初找到here。)

【讨论】:

  • 只是想指出这解决了我的问题。谢谢!!
  • 也适用于 OS X 10.11.1
  • 适用于 OS X 10.10 Yosemite。非常感谢!
【解决方案2】:

我从官方pkg重新安装node.js后解决了。

【讨论】:

    【解决方案3】:

    我也有这个问题。原来我已经升级了 Xcode,但从未重新启动。重启后我可以npm install成功了。

    【讨论】:

      猜你喜欢
      • 2021-03-27
      • 2013-11-08
      • 2016-05-21
      • 2020-05-21
      • 2020-12-10
      • 1970-01-01
      • 1970-01-01
      • 2016-07-02
      • 1970-01-01
      相关资源
      最近更新 更多