Go Tools in Visual Studio Code

Hi all,

I’m in the beginning of my Go journey and I’m very excited to be here, but running into a potentially silly error that I don’t understand. I am trying to install the Go tools from the command palette in VS Code, but then all of the installs fail.

My env variables are
GOPATH=Users/Alex/go
GOBIN=/bin

I see this error in my editor


go.toolsGopath setting is not set. Using GOPATH /Users/Alex/go
Installing 17 tools at the configured GOBIN: /bin in module mode.

16 tools failed to install.


Does anyone know why these tools won’t install? Does it even matter for using Go with VS Code? The error is basically what is happening here https://github.com/microsoft/vscode-go/issues/2811 and I still don’t understand why the tools won’t install for me

Your GOBIN is not user writable. Either unset it, such that go uses its default or use $GOPATH/bin (which basically is the default)

I’m not sure how I managed to set my GOBIN as /bin, but changed it to $GOPATH/bin and for some reason when I manually added the tools they worked.Thanks for the response!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.