title: Go error: no Go files in /usr/lib/go/src/go
body: <p>I'm having some trouble with my go installation in Arch Linux. I installed go a while ago, and haven't touched my installation in a few months. At the time, it was working, however.</p>
  
  <p>When I run the following program, test.go, with <code>go run test.go</code>,</p>
  
  <pre><code>package main
  
  import "fmt"
  
  func main() {
      fmt.Println("Hello World")
  }
  </code></pre>
  
  <p>I get the expected output:</p>
  
  <pre><code>Hello World
  </code></pre>
  
  <p>However when I try to run the following, Day3.go with <code>go run Day3.go</code>:</p>
  
  <pre><code>package main
  
  import (
      "fmt"
      "os"
      "go"
  )
  
  func main() {
      file, err := os.Open("puzzleinput.txt")
      if err != nil {
          log.Fatal(err)
      }
      fmt.Print(file)
  }
  </code></pre>
  
  <p>I get the following error message:</p>
  
  <pre><code>Day3.go:6:2: no Go files in /usr/lib/go/src/go
  </code></pre>
  
  <p>I also get this error message when trying to use <code>go get</code> and <code>go build</code>.
  Here's the result of <code>go env</code> (Go is installed under /usr/lib/go):</p>
  
  <pre><code>GO111MODULE=""
  GOARCH="amd64"
  GOBIN=""
  GOCACHE="/home/ulrich/.cache/go-build"
  GOENV="/home/ulrich/.config/go/env"
  GOEXE=""
  GOFLAGS=""
  GOHOSTARCH="amd64"
  GOHOSTOS="linux"
  GONOPROXY=""
  GONOSUMDB=""
  GOOS="linux"
  GOPATH="/home/ulrich/go"
  GOPRIVATE=""
  GOPROXY="https://proxy.golang.org,direct"
  GOROOT="/usr/lib/go"
  GOSUMDB="sum.golang.org"
  GOTMPDIR=""
  GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
  GCCGO="gccgo"
  AR="ar"
  CC="gcc"
  CXX="g++"
  CGO_ENABLED="1"
  GOMOD=""
  CGO_CFLAGS="-g -O2"
  CGO_CPPFLAGS=""
  CGO_CXXFLAGS="-g -O2"
  CGO_FFLAGS="-g -O2"
  CGO_LDFLAGS="-g -O2"
  PKG_CONFIG="pkg-config"
  GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build204360782=/tmp/go-build -gno-record-gcc-switches"
  </code></pre>
  
  <p>I've also tried uninstalling and reinstalling go, and reconfiguring my GOPATH and GOROOT environment variables to no avail. How can I fix this?</p>