go tool: no such tool "compile" error after installing a local build of go.
golang source was in
$ cd /usr/local$ ls
drwxr-xr-x@ 19 root wheel 608B Oct 18 19:35 go
drwxr-xr-x 16 root wheel 512B Oct 18 19:35 .
-rw-r--r--@ 1 root wheel 20M Oct 18 19:35 go1.11.13.src.tar.gz
go installation as follows:
cd src; ./all.bash
The final build output was
Installed Go for darwin/amd64 in /usr/local/go
Installed commands in /usr/local/go/bin
Now the PATH & GOROOT must have the following values:
$ export GOROOT=/usr/local/go
GOPATH value fixed the problem.
WHAT DIDN’T WORK
- Setting GOTOOLDIR
- Reinstalling GO