On MacOS Yosemite, inside my .profile
file I have set:
GOPATH="$HOME/go"
PATH="$PATH:$GOPATH/bin"
But go env
outputs:
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH=""
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
I also created .bashrc
inside my home folder, added the GOPATH variable to the file, but the end result is the same. And it seems that until I set this path variable, I'm unable to install any Go package. Any ideas what could be wrong?