If you are installing using OSX homebrew you may need to set the $GOROOT
in your .bashrc
, .zshrc
, etc:
export GOROOT=/usr/local/opt/go/libexec
I had the same error this morning when I updated from 1.9 -> 1.9.1 though according to several post the $GOROOT
shouldn’t have to be set and I had not set it until today. This may be a bug?
Edit: not a bug, for more details see answer below.