在 macOS 上安装 TinyGo 会导致命令行工具(CLT)SDK 文件夹名称不匹配的问题。

huangapple go评论86阅读模式
英文:

Installing TinyGo results in Command Line Tools (CLT) SDK folder names mismatch on macOS

问题

当按照TinyGo macOS快速安装指南进行操作时,我遇到了以下错误:错误:您的命令行工具(CLT)安装中的SDK内容与SDK文件夹名称不匹配。

% brew install tinygo
==> 正在从tinygo-org/tools安装tinygo
错误:您的命令行工具(CLT)安装中的SDK内容与SDK文件夹名称不匹配。
重新安装命令行工具(CLT)应该可以解决此问题。

完整的安装指南只有两个命令:

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

根据xcode-select --print-path显示,CLT当前安装在/Library/Developer/CommandLineTools中:

% 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希望将命令行工具安装在哪里?如何在那里安装它?

英文:

When following the TinyGo Quick Install Guide for macOS I'm running into the following error: Error: The contents of the SDKs in your Command Line Tools (CLT) installation do not match the SDK folder names.

% 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.

The full install instructions are just two commands:

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

The CLT are currently installed in /Library/Developer/CommandLineTools as shown by xcode-select --print-path:

% xcode-select --print-path
/Library/Developer/CommandLineTools

pkgutil shows I have the latest install:

% 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 

Reinstalling Command Line Tools results in the path being the same and confirmed in this article "How to Install Command Line Tools in Mac OS X (Without Xcode)". Where does TinyGo want the Command Line Tools to be installed and how can it be installed there?

答案1

得分: 1

TinyGo在macOS上的安装程序要求在完全安装Xcode时,已安装Command Line Tools的备用位置(而不仅仅是Command Line Tools):/Applications/Xcode.app/Contents/Developer

在安装Xcode之后(比仅安装CLT要大得多的软件包),xcode-select将显示备用位置,从而使得可以安装TinyGo:

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

TinyGo's installer for macOS requires Command Line Tools to be installed in the alternate location used when Xcode is fully installed (not just the Command Line Tools): /Applications/Xcode.app/Contents/Developer.

After installing Xcode (much larger package than just the CLT), xcode-select will show the alternate location which enables TinyGo to be installed:

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

huangapple
  • 本文由 发表于 2022年6月22日 00:56:43
  • 转载请务必保留本文链接:https://go.coder-hub.com/72704531.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定