All of a sudden go tool: no such tool "compile"
It may seem odd, but running export GOROOT=
fixed the issue for me.
The compile
program should be in your go env
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
directory. If not, download Go, delete /usr/local/go
, and reinstall Go.
I was facing the same issue in my MAC M1.
Previously, I had downloaded it using "brew". I tried downloading it manually and reinstalling it. That worked for me.
go version: 1.18.2 Download: https://go.dev/dl/