go:找不到GOROOT目录:/ usr / bin / go

Im trying to install a package but get the below problem even though my ROOT directory is set properly.

p@p-ubuntu:~/ba/docker-lvm-plugin$ which go
/usr/bin/go
p@p-ubuntu:~/ba/docker-lvm-plugin$ echo $GOROOT
/usr/bin/go
p@p-ubuntu:~/ba/docker-lvm-plugin$ go get github.com/Sirupsen/logrus
go: cannot find GOROOT directory: /usr/bin/go

If one issues go env then the following could be returned:

set GOPATH=C:\Users\user\go
set GOROOT=C:\tools\go

What is the GOPATH?

Create your workspace directory, %USERPROFILE%\go. (If you'd like to use a different directory, you will need to set the GOPATH environment variable; see How to Write Go Code for details.)

What is the GOROOT?

If you chose a directory other than c:\Go, you must set the GOROOT environment variable to your chosen path.