安装后使用brew设置GOPATH的位置?

时间:2015-03-25 12:44:21

标签: oauth go linuxbrew

我使用Linux brew在我的ubuntu 14.04上安装了Go,然后我将GOPATH设置为$HOME/go。但之后我尝试使用go get命令安装goauth包,但我的代码仍然没有导入goauth包。在经历错误后,我决定检查GOPATH。它已正确设置,但goauth包未安装在$HOME/go/src/code.google.com/p中。请建议我一个解决方案。这是我得到的错误。

dummy.go:5:8: cannot find package "code.google.com/p/goauth2/oauth" in any of:
    /home/avinash/.linuxbrew/Cellar/go/1.4.2/libexec/src/code.google.com/p/goauth2/oauth (from $GOROOT)
    /home/avinash/go/src/code.google.com/p/goauth2/oauth (from $GOPATH)
go/src/github.com/google/go-github/github/github.go:22:2: cannot find package "github.com/google/go-querystring/query" in any of:
    /home/avinash/.linuxbrew/Cellar/go/1.4.2/libexec/src/github.com/google/go-querystring/query (from $GOROOT)
    /home/avinash/go/src/github.com/google/go-querystring/query (from $GOPATH)

0 个答案:

没有答案