在实现Protobuf时遇到了未知的修订错误。(GO)

huangapple go评论75阅读模式
英文:

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

huangapple
  • 本文由 发表于 2022年1月8日 07:14:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/70628187.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定