英文:
Unknown revision error when implementing Protobuf. (GO)
问题
我现在正在使用GitHub存储库编写GO代码,并且需要拉取一个包。
go get github.com/cosmos/cosmos-sdk/types
当我输入时,出现以下内容:
go get: github.com/cosmos/cosmos-sdk@v0.33.2 正在更新到
github.com/cosmos/cosmos-sdk@v0.44.5 需要
github.com/gogo/protobuf@v1.3.3: 在修订版本v1.3.3上读取github.com/gogo/protobuf/go.mod:未知修订版本v1.3.3
英文:
I am coding at the moment GO with GitHub Repositories and need to pull a package.
go get github.com/cosmos/cosmos-sdk/types
When I enter there comes:
go get: github.com/cosmos/cosmos-sdk@v0.33.2 updating to
github.com/cosmos/cosmos-sdk@v0.44.5 requires
github.com/gogo/protobuf@v1.3.3: reading github.com/gogo/protobuf/go.mod at revision v1.3.3: unknown revision v1.3.3
答案1
得分: 4
是的,这是一个已知的问题。你可以尝试在你的 go.mod 文件中添加以下行作为替换指令:
replace (
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
)
你可以参考这里。
英文:
Yes this is a known issue. Can you try adding this line as a replace directive in your go.mod file:
replace (
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
)
for your reference please check here
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论