首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gcc在OS上导致dyld:库未加载: /opt/local/lib/libffi.6.dylib

gcc在OS上导致dyld:库未加载: /opt/local/lib/libffi.6.dylib
EN

Stack Overflow用户
提问于 2022-01-27 22:09:59
回答 1查看 361关注 0票数 0
代码语言:javascript
复制
$ gcc t0.c
dyld: Library not loaded: /opt/local/lib/libffi.6.dylib
  Referenced from: /opt/local/libexec/llvm-9.0/lib/libLLVM.dylib
  Reason: image not found
fatal error: /opt/local/bin/as: fatal error in /opt/local/bin/clang-mp-9.0

$ gcc --version
gcc (MacPorts gcc9 9.2.0_1) 9.2.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

有什么帮助吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-01-31 11:11:13

它是如何固定的:

代码语言:javascript
复制
# update ports tree
$ sudo port selfupdate

# uninstall all ports
# note: in my case uninstalling all ports is much faster than
#       auto-rebuilding ports which have/cause linking issues
$ sudo port -fp uninstall installed

# install needed ports
$ port install xxx yyy zzz

# test
$ gcc t0.c
<no errors as expected>

更多信息:https://guide.macports.org/#using.common-tasks

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70886413

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档