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?
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