I've installed go 1.12 using homebrew.
My .zshrc contains:
export GOPATH=$HOME/golang
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"
When i run GoInstallBinaries i get the following errors (Running go get -v -u
vim-go: gogetdoc not found. Installing github.com/zmb3/gogetdoc to folder
Error installing github.com/zmb3/gogetdoc: go build github.com/zmb3/gogetdoc: open /gogetdoc: permission denied^@
vim-go: guru not found. Installing golang.org/x/tools/cmd/guru to folder
Error installing golang.org/x/tools/cmd/guru: go build golang.org/x/tools/cmd/guru: open /guru: permission denied^@
vim-go: gopls not found. Installing golang.org/x/tools/cmd/gopls to folder
Error installing golang.org/x/tools/cmd/gopls: go build golang.org/x/tools/cmd/gopls: open /gopls: permission denied^@
vim-go: fillstruct not found. Installing github.com/davidrjenni/reftools/cmd/fillstruct to folder
Error installing github.com/davidrjenni/reftools/cmd/fillstruct: go build github.com/davidrjenni/reftools/cmd/fillstruct: open /fillstruct: permission denied^@
vim-go: godef not found. Installing github.com/rogpeppe/godef to folder
Error installing github.com/rogpeppe/godef: go build github.com/rogpeppe/godef: open /godef: permission denied^@
vim-go: motion not found. Installing github.com/fatih/motion to folder
Error installing github.com/fatih/motion: go build github.com/fatih/motion: open /motion: permission denied^@
vim-go: errcheck not found. Installing github.com/kisielk/errcheck to folder
Error installing github.com/kisielk/errcheck: go build github.com/kisielk/errcheck: open /errcheck: permission denied^@
vim-go: dlv not found. Installing github.com/go-delve/delve/cmd/dlv to folder
Error installing github.com/go-delve/delve/cmd/dlv: go build github.com/go-delve/delve/cmd/dlv: open /dlv: permission denied^@
vim-go: gocode not found. Installing github.com/mdempsky/gocode to folder
Error installing github.com/mdempsky/gocode: go build github.com/mdempsky/gocode: open /gocode: permission denied^@
vim-go: impl not found. Installing github.com/josharian/impl to folder
Error installing github.com/josharian/impl: go build github.com/josharian/impl: open /impl: permission denied^@
vim-go: iferr not found. Installing github.com/koron/iferr to folder
Error installing github.com/koron/iferr: go build github.com/koron/iferr: open /iferr: permission denied^@
vim-go: gotags not found. Installing github.com/jstemmer/gotags to folder
Error installing github.com/jstemmer/gotags: go build github.com/jstemmer/gotags: open /gotags: permission denied^@
vim-go: gorename not found. Installing golang.org/x/tools/cmd/gorename to folder
Error installing golang.org/x/tools/cmd/gorename: go build golang.org/x/tools/cmd/gorename: open /gorename: permission denied^@
vim-go: goimports not found. Installing golang.org/x/tools/cmd/goimports to folder
Error installing golang.org/x/tools/cmd/goimports: go build golang.org/x/tools/cmd/goimports: open /goimports: permission denied^@
vim-go: gocode-gomod not found. Installing github.com/stamblerre/gocode to folder
Error installing github.com/stamblerre/gocode: go build github.com/stamblerre/gocode: open /gocode-gomod: permission denied^@
vim-go: gomodifytags not found. Installing github.com/fatih/gomodifytags to folder
Error installing github.com/fatih/gomodifytags: go build github.com/fatih/gomodifytags: open /gomodifytags: permission denied^@
vim-go: keyify not found. Installing honnef.co/go/tools/cmd/keyify to folder
Error installing honnef.co/go/tools/cmd/keyify: go build honnef.co/go/tools/cmd/keyify: open /keyify: permission denied^@
vim-go: golint not found. Installing golang.org/x/lint/golint to folder
Error installing golang.org/x/lint/golint: go build golang.org/x/lint/golint: open /golint: permission denied^@
vim-go: asmfmt not found. Installing github.com/klauspost/asmfmt/cmd/asmfmt to folder
Error installing github.com/klauspost/asmfmt/cmd/asmfmt: go build github.com/klauspost/asmfmt/cmd/asmfmt: open /asmfmt: permission denied^@
vim-go: gometalinter not found. Installing github.com/alecthomas/gometalinter to folder
Error installing github.com/alecthomas/gometalinter: go build github.com/alecthomas/gometalinter: open /gometalinter: permission denied^@
vim-go: installing finished!
Adding the following to my .zshrc solved the issue:
export GOBIN=$GOPATH/bin
Most helpful comment
Adding the following to my .zshrc solved the issue:
export GOBIN=$GOPATH/bin