登录
首页 >  Golang >  Go问答

TinyGo安装后导致macOS命令行工具(CLT)SDK文件夹名称不匹配

来源:stackoverflow

时间:2024-03-01 18:30:27 368浏览 收藏

哈喽!大家好,很高兴又见面了,我是golang学习网的一名作者,今天由我给大家带来一篇《TinyGo安装后导致macOS命令行工具(CLT)SDK文件夹名称不匹配》,本文主要会讲到等等知识点,希望大家一起学习进步,也欢迎大家关注、点赞、收藏、转发! 下面就一起来看看吧!

问题内容

按照适用于 macos 的 tinygo 快速安装指南进行操作时,我遇到以下错误:error:命令行工具 (clt) 安装中的 sdk 内容与 sdk 文件夹名称不匹配。

% brew install tinygo
==> installing tinygo from tinygo-org/tools
error: the contents of the sdks in your command line tools (clt) installation do not match the sdk folder names.
a clean reinstall of command line tools (clt) should fix this.

完整的安装说明只有两个命令:

% brew tap tinygo-org/tools
% brew install tinygo

clt 当前安装在 /library/developer/commandlinetools 中,如 xcode-select --print-path 所示:

% xcode-select --print-path
/library/developer/commandlinetools

pkgutil 显示我安装了最新版本:

% pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
package-id: com.apple.pkg.CLTools_Executables
version: 13.4.0.0.1.1651278267
volume: /
location: /
install-time: 1654474872
groups: com.apple.FindSystemFiles.pkg-group 

重新安装命令行工具会导致路径相同,并在本文“如何在 mac os x 中安装命令行工具(无需 xcode)”中得到确认。 tinygo 希望将命令行工具安装在哪里以及如何安装在那里?


正确答案


tinygo 的 macos 安装程序要求将命令行工具安装在 xcode 完全安装时使用的备用位置(不仅仅是命令行工具):/applications/xcode.app/contents/developer

安装 xcode(比 clt 更大的包)后,xcode-select 将显示允许安装 tinygo 的备用位置:

% xcode-select --print-path
/Applications/Xcode.app/Contents/Developer

理论要掌握,实操不能落!以上关于《TinyGo安装后导致macOS命令行工具(CLT)SDK文件夹名称不匹配》的详细介绍,大家都掌握了吧!如果想要继续提升自己的能力,那么就来关注golang学习网公众号吧!

声明:本文转载于:stackoverflow 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
最新阅读
更多>
课程推荐
更多>