Note that there are some explanatory texts on larger screens.

plurals
  1. PO'go install' trying to install to /usr/lib/go instead of my GOPATH. Permission denied
    primarykey
    data
    text
    <p>I have had some difficulties getting Go up and running correctly on Linux Mint 14. I have a folder ($HOME/develop/gocode) with <code>bin</code>, <code>pkg</code> and <code>src</code> folders as my <code>GOPATH</code> and have the <code>GOPATH</code> environment variable set properly there. I tried installing a certain github repository using <code>go get</code> (<a href="https://github.com/jbarham/primegen.go" rel="noreferrer">https://github.com/jbarham/primegen.go</a>) but Go gave me the error: <code>stat github.com/jbarham/primegen.go: no such file or directory</code> (I think because the repository ends in .go.) Fine, I just cloned it manually, but then when I try to <code>go install</code> one of two executables in that repository (neither one works, but I tried installing primespeed first) I get the following error:</p> <pre><code>$ cd $GOPATH/src/github.com/jbarham/primegen.go/primespeed $ go install go install github.com/jbarham/primegen.go: mkdir /usr/lib/go/pkg/linux_amd64/github.com: permission denied </code></pre> <p>Why is go trying to install the package there? I've explicitly set my <code>GOPATH</code> variable, and yet it is trying to install packages to /usr/local instead.</p> <p>I'm not sure if it will help, but here is some other output regarding version and environment:</p> <pre><code>$ go env GOROOT="/usr/lib/go" GOBIN="" GOARCH="amd64" GOCHAR="6" GOOS="linux" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64" GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread" CGO_ENABLED="1" $ go version go version go1.0.2 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload