title: go install: no install location for directory outside GOPATH
body: <p>I installed the Go, then added path requirements to my <code>.bash_profile</code>:</p>
  <ul>
  <li><code>export PATH=$PATH:/usr/local/go/bin</code></li>
  <li><code>export GOPATH=$HOME/go</code></li>
  </ul>
  <p>I then setup the correct folders:</p>
  <p><img src="https://i.stack.imgur.com/00Rjm.png" alt="Folders" /></p>
  <p>I also created a projected called <strong>tire</strong>.
  The contents for <code>main.go</code> are simply:</p>
  <pre><code>package main
  
  import &quot;fmt&quot;
  
  func main() {
    fmt.Println(&quot;Hello, world!&quot;)
  }
  </code></pre>
  <p>I always get the following error when I try to run <code>go install</code>:</p>
  <p><code>go install: no install location for directory /Users/Daryl/go/src/tire outside GOPATH</code></p>
  <p>Here's what I get when I run <code>go env</code>:</p>
  <pre><code>GOARCH=&quot;amd64&quot;
  GOBIN=&quot;&quot;
  GOCHAR=&quot;6&quot;
  GOEXE=&quot;&quot;
  GOHOSTARCH=&quot;amd64&quot;
  GOHOSTOS=&quot;darwin&quot;
  GOOS=&quot;darwin&quot;
  GOPATH=&quot;/Users/daryl/go&quot;
  GORACE=&quot;&quot;
  GOROOT=&quot;/usr/local/go&quot;
  GOTOOLDIR=&quot;/usr/local/go/pkg/tool/darwin_amd64&quot;
  TERM=&quot;dumb&quot;
  CC=&quot;clang&quot;
  GOGCCFLAGS=&quot;-g -O2 -fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fno-common&quot;
  CXX=&quot;clang++&quot;
  CGO_ENABLED=&quot;1&quot;
  </code></pre>
  <p>Any help would be appreciated.</p>