VS code 在 Mac上debug调试 go 项目 遇到的错误提示:

博客讲述在Mac上编译Go代码时,出现提示问题,tld文件在/System/Library/Frameworks/中不同步。参考stackoverflow上的高赞答案,解决办法是将来自MacOSX.sdk的最新框架链接到 /Library/Frameworks/。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

# crypto/x509
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.

如上所示,虽然可以正常运行,但是这些提示很扎眼,所以找处理办法。
参考:stackoverflow 上关于此错误提示的解决办法的提问

高赞答案如下:

I had this problem while compiling Go code on my Mac too.
The tld files were out of sync in /System/Library/Frameworks/.
The solution:
Just links the recent frameworks from MacOSX.sdk to /Library/Frameworks/

我在Mac上编译围棋代码时也遇到了这个问题。
tld文件在/System/Library/Frameworks/中不同步。
解决方案:
只链接来自MacOSX的最新框架 /Library/Frameworks/

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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值