手动编译 doozerd 失败
我将 doozerd 源安装在:
home/stephan/src/go/src/pkg/github.com/ha/doozerd
$GOROOT = /home/stephan/src/go $GOPATH = /home/stephan/src/go/src/pkg/
当我尝试在 github 的 doozerd checkout 中执行 ./all.sh 时,出现无法在本地找到包的错误..:
.
imports github.com/ha/doozerd/peer
imports github.com/ha/doozerd/web
imports code.google.com/p/go.net/websocket: /home/stephan/src/go/src/pkg/github.com/ha/doozerd/web/web.go:4:2: package could not be found locally
.
imports github.com/ha/doozerd/peer
imports github.com/ha/doozerd/consensus
imports code.google.com/p/goprotobuf/proto: /home/stephan/src/go/src/pkg/github.com/ha/doozerd/server/conn.go:4:2: package could not be found locally
.
imports github.com/ha/doozer: /home/stephan/src/go/src/pkg/github.com/ha/doozerd/peer/peer.go:4:2: package could not be found locally
我以为 go 会找到缺少要求,并自行安装。 我缺少什么?
I installed doozerd sources in:
home/stephan/src/go/src/pkg/github.com/ha/doozerd
$GOROOT = /home/stephan/src/go
$GOPATH = /home/stephan/src/go/src/pkg/
When I try to do ./all.sh in the doozerd checkout from github I get package could not be found locally errors.. :
.
imports github.com/ha/doozerd/peer
imports github.com/ha/doozerd/web
imports code.google.com/p/go.net/websocket: /home/stephan/src/go/src/pkg/github.com/ha/doozerd/web/web.go:4:2: package could not be found locally
.
imports github.com/ha/doozerd/peer
imports github.com/ha/doozerd/consensus
imports code.google.com/p/goprotobuf/proto: /home/stephan/src/go/src/pkg/github.com/ha/doozerd/server/conn.go:4:2: package could not be found locally
.
imports github.com/ha/doozer: /home/stephan/src/go/src/pkg/github.com/ha/doozerd/peer/peer.go:4:2: package could not be found locally
I thought go would find the missing requirements, and install them itself.
What am I missing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
$GOPATH =
/home/stephan/src/go/src/pkg/
表示 go 工具在以下位置查找包/home/stephan/src/go/src/pkg/src/
,但您已将源代码放入/home/stephan/src/go/src /pkg/github.com/ha/doozerd
相反。$GOPATH =
/home/stephan/src/go/src/pkg/
means the go tool looks for packages in/home/stephan/src/go/src/pkg/src/<import-path>
, but you've put the sources in/home/stephan/src/go/src/pkg/github.com/ha/doozerd
instead.