我在以下位置安装了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签出中执行./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会找到缺失的需求,并自行安装它们。我遗漏了什么?
发布于 2012-02-20 21:24:22
$GOPATH =
/home/stephan/src/go/src/pkg/意味着go工具在/home/stephan/src/go/src/pkg/src/<import-path>中查找包,但您将源代码放在/home/stephan/src/go/src/pkg/github.com/ha/doozerd中。
https://stackoverflow.com/questions/9360618
复制相似问题