title: `go install` not working on Mac
body: <p>I wanted to install a Go binary with <code>go install</code>. So I have downloaded the sources with</p>
  
  <pre><code>go get -v github.com/spf13/cobra/cobra
  </code></pre>
  
  <p>which gave me</p>
  
  <pre><code> $GOPATH/src
       └── github.com
           └── spf13
               ├── cobra
               └── pflag
  </code></pre>
  
  <p>I created a <code>$GOPATH/bin</code> directory. When I now run </p>
  
  <pre><code>go install github.com/spf13/cobra/cobra
  </code></pre>
  
  <p>(as stated in the documentation), nothing happens - there is no error message but after the command run, there is also no binary in <code>$GOPATH/bin</code>.</p>
  
  <p>Here is the output of my <code>go env</code></p>
  
  <pre><code>GOARCH="amd64"
  GOBIN="/Users/user/Workspace/go/bin"
  GOEXE=""
  GOHOSTARCH="amd64"
  GOHOSTOS="darwin"
  GOOS="darwin"
  GOPATH="/Users/user/Workspace/go"
  GORACE=""
  GOROOT="/usr/local/Cellar/go/1.6/libexec"
  GOTOOLDIR="/usr/local/Cellar/go/1.6/libexec/pkg/tool/darwin_amd64"
  GO15VENDOREXPERIMENT="1"
  CC="clang"
  GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
  CXX="clang++"
  CGO_ENABLED="1"
  </code></pre>
  
  <p>Any idea what's going wrong or how I can probably debug this? Thanks!</p>
  
  <p><strong>Edit</strong></p>
  
  <p>What solved the problem for me was to delete the <code>$GOPATH/src</code> and <code>$GOPATH/pkg</code>folder and re-run <code>go get -v -x github.com/spf13/cobra/cobra</code>.</p>
  
  <p>The <code>-x</code>flag provides more output and as stated by @JimB it ended successfully with </p>
  
  <pre><code>mv $WORK/github.com/spf13/cobra/cobra/_obj/exe/a.out /Users/user/Workspace/go/bin/cobra
  </code></pre>