mac go build 或 go run 会报下面错误 ld: warning: text-based stub file

版权声明:原创文章欢迎转载,不过要记得加出处哦 https://blog.csdn.net/wljk506/article/details/84318722

ld: warning: text-based stub file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation.tbd and library file /System/Library/Frameworks//CoreFoundation.framework/CoreFoundation are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//Security.framework/Security.tbd and library file /System/Library/Frameworks//Security.framework/Security are out of sync. Falling back to library file for linking.

执行以下命令

xcode-select --install

再执行

sudo ln -s  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/CoreFoundation.framework /Library/Frameworks/CoreFoundation.framework
sudo ln -s  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Security.framework /Library/Frameworks/Security.framework

来源:
https://stackoverflow.com/questions/51314888/ld-warning-text-based-stub-file-are-out-of-sync-falling-back-to-library-file
https://studygolang.com/articles/13227

https://gocn.vip/question/2232

阅读更多

扫码向博主提问

风.foxwho

非学,无以致疑;非问,无以广识
  • 擅长领域:
  • php
  • java
  • go
  • 架构
  • more
去开通我的Chat快问

没有更多推荐了,返回首页