登录
首页 >  Golang >  Go问答

问题出现在安装 Golang 脚本的依赖项时

来源:stackoverflow

时间:2024-03-11 15:15:21 369浏览 收藏

小伙伴们有没有觉得学习Golang很有意思?有意思就对了!今天就给大家带来《问题出现在安装 Golang 脚本的依赖项时》,以下内容将会涉及到,若是在学习中对其中部分知识点有疑问,或许看了本文就能帮到你!

问题内容

当我为 golang 文件安装一些依赖项时 出现这个错误

Vendoring Go dependencies ...
~/blockchain/FabricNetwork-2.x-main/artifacts/src/github.com/fabcar/go ~/blockchain/FabricNetwork-2.x-main
go: github.com/hyperledger/[email protected]+incompatible: missing go.sum entry; to add it:
    go mod download github.com/hyperledger/fabric
go: github.com/hyperledger/[email protected]+incompatible: missing go.sum entry; to add it:
    go mod download github.com/hyperledger/fabric
~/blockchain/FabricNetwork-2.x-main
Finished vendoring Go dependencies

正确答案



出现此错误是因为您的 go 包管理器未创建包含包校验和的 go.sum 文件。
您是否尝试按照消息中提到的方式运行 go mod download github.com/hyperledger/fabric

missing go.sum entry; to add it:
go mod download github.com/hyperledger/fabric

我希望这有帮助:)
问候。

今天关于《问题出现在安装 Golang 脚本的依赖项时》的内容就介绍到这里了,是不是学起来一目了然!想要了解更多关于的内容请关注golang学习网公众号!

声明:本文转载于:stackoverflow 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
最新阅读
更多>
课程推荐
更多>