I installed go1.5.2 darwin/amd64, but when I run the command go version
, I get an error in the terminal zsh: command not found: go
.
I added the path export PATH=$PATH:/usr/local/go/bin
to the bash profile, but I still get the error (I restarted the terminal btw).
I uninstalled and reinstalled, but no luck.
Like bjhaid mentioned in the comments above:
This is happening because you must add your PATH
to your ~/.zshrc
file.
in the ~/.zshrc
you should add the line:
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:$GOPATH/bin
you should then source you .zshrc
file:
. ~/.zshrc