mac go buildまたはgo runは、次のエラーld:warning:text-based stub fileを報告します.

1089 ワード

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