rpcxio / rpcx-etcd

etcd plugin for rpcx
Apache License 2.0
30 stars 24 forks source link

go.etcd.io/etcd v3.4.14+incompatible 查找不到 #4

Closed 435420057 closed 3 years ago

435420057 commented 3 years ago

在获取 github.com/rpcxio/rpcx-etcd 时候出现以下问题,怎么处理呢 go: github.com/rpcxio/rpcx-etcd@v0.0.0-20201229103411-8317fc934fbb requires go.etcd.io/etcd@v3.4.14+incompatible: reading https://goproxy.cn/go.etcd.io/etcd/@v/v3.4.14+incompatible.mod: 404 Not Found server response: not found: go.etcd.io/etcd@v3.4.14+incompatible: invalid version: +incompatible suffix not allowed: module contains a go.mod file, so semantic import versioning is required

smallnest commented 3 years ago

第二个同学说这个问题了,我这里复现不了,项目的travis ci编译也没问题。 你可以到etcd项目中提问,3.4.14版本是存在的

435420057 commented 3 years ago

谢谢,我到官方去看看

smallnest commented 3 years ago

https://github.com/etcd-io/etcd/issues/12464

Etcd一直go module支持的不好。

smallnest commented 3 years ago

你可以给goproxy.cn提个bug,可能是代理的问题,没有处理incompatible关键字?

https://goproxy.cn/go.etcd.io/etcd/@v/v3.4.14+incompatible.mod

smallnest commented 3 years ago

使用 goproxy.io做代理,不要使用goproxy.cn或者ali的proxy试试,应该可以。

 go env -w GOPROXY=https://goproxy.io,direct
ansoda commented 3 years ago

我这边遇到了同样的问题,换代理都不行

435420057 commented 3 years ago

给你个临时解决方案,到官方下载v3.4.14的包。解压到你项目目录附近并创建对应完整目录,这样“go.etcd.io/etcd ”, 然后通过你的go.mod文件里面replace把go.etcd.io/etcd指过去就好了。这只是个临时解决办法。

看来起像这样:

replace ( go.etcd.io/etcd => ../../../go.etcd.io/etcd@v3.4.14 google.golang.org/grpc => google.golang.org/grpc v1.29.1 )

ansoda commented 3 years ago

这样感觉不是很优雅,我先用v5.7.9版本吧。 @smallnest 你可以帮忙看看,这个确实有问题。

smallnest commented 3 years ago

可以确定是代理问题

ansoda commented 3 years ago

可能真的是代理问题,但国内就goproxy.io,goproxy.cn这几个代理可用,我看很多人都有同样的问题,能否优化下,能兼容国内代理呢?

meilihao commented 3 years ago

pkg.go.dev上查找最新也就v3.3.25+incompatible, 这明显和实际不符.

smallnest commented 3 years ago

github上这个版本是有的。如果https://pkg.go.dev/go.etcd.io/etcd@v3.3.25+incompatible大家没问题的话我考虑改成3.3.25 版本

dengzhaofun commented 3 years ago

有解决方案了吗 赶紧解决啊 现在编译不过 太蛋疼了

ansoda commented 3 years ago

可能大家对用哪个版本etcd暂时不是很关心,主要是得能正常编译过,否则rpcx就更新不上去。 @smallnest

smallnest commented 3 years ago

changed etcd to v3.3.25+incompatible

ansoda commented 3 years ago

image

smallnest commented 3 years ago

这是etcd的一个问题。需要你在你的go.mod中加上:

replace (
    github.com/coreos/bbolt => go.etcd.io/bbolt v1.3.3
    google.golang.org/grpc => google.golang.org/grpc v1.26.0
)
arigon commented 3 years ago

@ansoda this dependency problem should now be solved with the newest version. please test it.