Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
435420057 opened this issue Jan 5, 2021 · 18 comments
Closed

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

435420057 opened this issue Jan 5, 2021 · 18 comments

Comments

@435420057
Copy link

在获取 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
Copy link
Member

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

@435420057
Copy link
Author

谢谢,我到官方去看看

@smallnest
Copy link
Member

etcd-io/etcd#12464

Etcd一直go module支持的不好。

@smallnest
Copy link
Member

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

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

@smallnest
Copy link
Member

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

 go env -w GOPROXY=https://goproxy.io,direct

@ansoda
Copy link

ansoda commented Jan 13, 2021

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

@435420057
Copy link
Author

435420057 commented Jan 13, 2021

给你个临时解决方案,到官方下载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
Copy link

ansoda commented Jan 13, 2021

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

@smallnest
Copy link
Member

可以确定是代理问题

@ansoda
Copy link

ansoda commented Jan 14, 2021

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

@meilihao
Copy link

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

@smallnest
Copy link
Member

@smallnest smallnest reopened this Jan 14, 2021
@dengzhaofun
Copy link

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

@ansoda
Copy link

ansoda commented Jan 15, 2021

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

@smallnest
Copy link
Member

changed etcd to v3.3.25+incompatible

@ansoda
Copy link

ansoda commented Jan 15, 2021

image

@smallnest
Copy link
Member

这是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
Copy link
Contributor

arigon commented Mar 9, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants