user1050619
user1050619

Reputation: 20906

Go installing package /usr/bin/go not a directory

Im trying to install a Go package but having the following error.

Here is my GOPATH

p@p-ubuntu:~/ba/docker-lvm-plugin$ echo $GOPATH
/usr/bin/go

Package install

p@p-ubuntu:~/ba/docker-lvm-plugin$ go get github.com/Sirupsen/logrus
    package github.com/Sirupsen/logrus: mkdir /usr/bin/go: not a directory

Upvotes: 2

Views: 11071

Answers (2)

clevertension
clevertension

Reputation: 7077

please change the GOBIN to available path, for example $GOPATH/bin, or $GOROOT/bin

you can see GOBIN with go env

Upvotes: 0

Adrian
Adrian

Reputation: 46562

Your GOPATH is wrong. It should not be the path to the go binary, it should be the path to the root of your go project directory, which should contain src, pkg, and bin subdirectories. See what should be the values of GOPATH and GOROOT?

Upvotes: 9

Related Questions