英文:
How to resolve broken go indirect dependency?
问题
我有一个项目,其中使用了github.com/datawire/ambassador@v1.14.0
,由于ambassador
更新了仓库名称,我已经相应地进行了更改。但是在没有任何修改的情况下,出现了以下错误:
执行go mod tidy
命令后的错误信息如下:
go: github.com/datawire/ambassador@v1.14.0 需要
helm.sh/helm/v3@v3.5.3 需要
github.com/deislabs/oras@v0.10.0 需要
github.com/docker/distribution@v0.0.0-00010101000000-000000000000: 无效的版本: 未知的修订版本 000000000000
作为一个新手,我无法解决这个问题。
英文:
As I have a project that has github.com/datawire/ambassador@v1.14.0
, since the ambassador
updated repo name I have changed accordingly.
Without any modification the error looks:
go mod tidy
go: github.com/datawire/ambassador@v1.14.0 requires
helm.sh/helm/v3@v3.5.3 requires
github.com/deislabs/oras@v0.10.0 requires
github.com/docker/distribution@v0.0.0-00010101000000-000000000000: invalid version: unknown revision 000000000000
As a new go learner, I couldn't figure out how to solve it.
答案1
得分: 0
请将以下内容添加到go.mod文件中:
replace (
github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d
github.com/docker/docker => github.com/moby/moby v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible
)
英文:
Add the following lines in to go.mod file
replace (
github.com/docker/distribution => github.com/docker/distribution v0.0.0-20191216044856-a8371794149d
github.com/docker/docker => github.com/moby/moby v17.12.0-ce-rc1.0.20200618181300-9dc6525e6118+incompatible
)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论