libmpc - dyld:库未加载 - 原因:找不到图像

Posted

技术标签:

【中文标题】libmpc - dyld:库未加载 - 原因:找不到图像【英文标题】:libmpc - dyld: Library not loaded - Reason: image not found 【发布时间】:2014-04-30 09:15:44 【问题描述】:

所以有一天我的 Mac 拒绝启动,我只能通过重新安装 OSX Mavericks 来修复它。之后,我的由 homebrew 管理的编程环境停止工作。 首先,我必须重新链接所有公式才能恢复我的命令。现在,当我编译我的 C++ 项目时,出现以下错误。

cls ~/workspace/NetworKit $ !scons
scons --target=Tests --optimize=D 
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++-4.8 -o .buildD/centrality/Betweenness.o -c -std=c++11 -Wall -c -fmessage-length=0 -fPIC -fopenmp -O0 -g3 -I/Users/cls/workspace/gtest-1.7.0/include src/cpp/centrality/Betweenness.cpp
dyld: Library not loaded: /usr/local/opt/libmpc08/lib/libmpc.2.dylib
  Referenced from: /usr/local/Cellar/gcc48/4.8.2/libexec/gcc/x86_64-apple-darwin13.0.0/4.8.2/cc1plus
  Reason: image not found
g++-4.8: internal compiler error: Trace/BPT trap: 5 (program cc1plus)
scons: *** [.buildD/centrality/Betweenness.o] Error -6
scons: building terminated because of errors.

图书馆出了什么问题,我该如何解决?

【问题讨论】:

【参考方案1】:

通过重新安装 GCC 4.8 解决:

brew reinstall gcc48

【讨论】:

这样做安全吗?它会影响clang吗?

以上是关于libmpc - dyld:库未加载 - 原因:找不到图像的主要内容,如果未能解决你的问题,请参考以下文章

如何修复 dyld:库未加载... 原因:找不到图像 中止陷阱:6?

dyld:库未加载:@rpath/XCTest.framework/XCTest 原因:找不到图像

WatchOS 2 应用程序无法在我的框架库未加载的 dyld_fatal_error 的设备上启动:找不到图像

如何解决库未加载的错误?

dyld:库未加载:/usr/local/opt/tidy-html5/lib/libtidy.5.dylib

仍然 dyld:库未加载