title: go install always attempts to use GOROOT and GOPATH is not listed under go env
body: <p>I'm having a quite frustrating problem with the <code>GOPATH</code>, which, despite being set in <code>.profile</code>, is not appearing when invoking <code>go env</code>, and does not appear to be affecting the <code>go install</code> target location.</p>
  
  <p>I'm attempting to use <code>go install</code> to install packages, and am getting this error, which clearly shows that it is attempting to install in <code>/usr/lib/go</code>, rather than the intended directory of <code>/home/me/dev/go</code>.</p>
  
  <pre><code>$ go install github.com/songgao/colorgo
  go install github.com/songgao/go.pipeline: mkdir /usr/lib/go/pkg/linux_386/github.com: permission denied
  </code></pre>
  
  <p><code>go env</code> gives the following results.</p>
  
  <pre><code>$ go env
  GOROOT="/usr/lib/go"
  GOBIN=""
  GOARCH="386"
  GOCHAR="8"
  GOOS="linux"
  GOEXE=""
  GOHOSTARCH="386"
  GOHOSTOS="linux"
  GOTOOLDIR="/usr/lib/go/pkg/tool/linux_386"
  GOGCCFLAGS="-g -O2 -fPIC -m32 -pthread"
  CGO_ENABLED="1"
  </code></pre>
  
  <p>But it most certainly <em>is</em> set.</p>
  
  <pre><code>$ echo $GOPATH
  /home/me/dev/go
  </code></pre>
  
  <p><strong>Update:</strong> I have exported GOPATH in <code>~/.profile</code> and sourced it, but I'm still having the same problem.</p>
  
  <pre><code>$ export GOPATH=/home/me/dev/go
  $ go env
  GOROOT="/usr/lib/go"
  GOBIN=""
  GOARCH="386"
  GOCHAR="8"
  GOOS="linux"
  GOEXE=""
  GOHOSTARCH="386"
  GOHOSTOS="linux"
  GOTOOLDIR="/usr/lib/go/pkg/tool/linux_386"
  GOGCCFLAGS="-g -O2 -fPIC -m32 -pthread"
  CGO_ENABLED="1"
  </code></pre>
  
  <p><strong>Update again:</strong> This problem has ceased since I upgraded to go1.1beta2. I'm not sure what was wrong, because <code>GOPATH</code> appeared to be set correctly, but it's all apparently working now.</p>