手动编译 doozerd 失败

发布于 2025-01-07 15:13:28 字数 922 浏览 2 评论 0原文

我将 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

寄离 2025-01-14 15:13:28

$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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文