Go build error after MacOS Monterey system upgrade [How to Solve]

error

/usr/local/Cellar/go/1.16.3/libexec/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

Solution

xcode-select --install

If you still can’t

sudo xcode-select --reset

Similar Posts: