【发布时间】:2016-11-30 21:22:12
【问题描述】:
我在 Windows 8.1 64 位上使用 go 1.5.1。我的环境中没有设置GO15VENDOREXPERIMENT。我安装了最新版本的 git 和 bazaar。
我正在尝试获取gomniauth 包:
go get github.com/stretchr/gomniauth
即使过程完成且没有任何错误,也没有引入很多依赖项。
例如,在编译我的应用程序(取决于 gomniauth)时,我收到以下错误:
..\github.com\stretchr\codecs\xml\simple_xml_codec.go:5:2: cannot find package "github.com/clbanning/x2j" in any of:
C:\Go\src\github.com\clbanning\x2j (from $GOROOT)
C:\work\src\github.com\clbanning\x2j (from $GOPATH)
..\github.com\stretchr\codecs\msgpack\msgpack_codec.go:6:2: cannot find package "github.com/ugorji/go/codec" in any of:
C:\Go\src\github.com\ugorji\go\codec (from $GOROOT)
C:\work\src\github.com\ugorji\go\codec (from $GOPATH)
..\github.com\stretchr\codecs\bson\bson_codec.go:5:2: cannot find package "labix.org/v2/mgo/bson" in any of:
C:\Go\src\labix.org\v2\mgo\bson (from $GOROOT)
C:\work\src\labix.org\v2\mgo\bson (from $GOPATH)
它似乎拉入了gomniauth 的直接依赖项,但没有拉入依赖项的依赖项。我已经从我的GOPATH/src 和GOPATH/pkg 中删除了stretchr 文件夹,但是在多次运行go get 之后,它仍然没有拉入第二级以外的任何依赖项。
我 100% 确信自己没有网络问题。我可以使用浏览器或 curl 访问这些 github 存储库。
【问题讨论】:
-
您确定这些是
gominiauth的依赖项吗?如果是:你为什么确定? -
通过查看
gomniauth的来源及其依赖关系。gomniauth取决于stretchr/codecs,而clganning/x2j、ugorji/go/codec和labix.org/v2/mgo/bson。
标签: go package-management