解决方案一:

当在代码中使用了第三方库 ,但是go.mod中并没有跟着更新的时候

如果直接run或者build就会报这个错误

missing go.sum entry for module providing package <package_name>

可以使用go mod tidy 来整理依赖

这个命令会:

删除不需要的依赖包

下载新的依赖包

更新go.sum

解决方案二:

go build -mod=mod

本人遇到同样的问题,就是用方案解决的。

Go构建项目的时候,解决missing go.sum entry for module providing package <package_name>相关推荐

  1. [Go] 解决main.go:5:2: missing go.sum entry for module providing package github.com/astaxie/beego

    当在代码中使用了第三方库 ,但是go.mod中并没有跟着更新的时候 如果直接run或者build就会报这个错误 main.go:5:2: missing go.sum entry for module ...

  2. go出现missing go.sum entry for module providing package 错误

    文章目录 前言 问题分析 解决方法 前言 从github下载了别人的代码后直接执行,报missing go.sum entry for module providing package错误 问题分析 ...

  3. 【go modules】missing go.sum entry for module providing package

    问题描述: go get 下载第三方包采用module 管理包一般会放在pkg/mod 下面,那么如何自动管理包,以及导入包呢? go get github.com/gin-gonic/gin imp ...

  4. go build 编译报错 missing go.sum entry for module providing package

    go build 编译报错 missing go.sum entry for module providing package 解决方法 // 移除未使用的依赖 go mod tidy 再次编译,就可 ...

  5. go语言单元测试报错:missing go.sum entry for module providing package github.com/stretchr/testify/assert

    报错:missing go.sum entry for module providing package github.com/stretchr/testify/assert (imported by ...

  6. missing go.sum entry for module providing package

    1.启动报错信息: xxxxx missing go.sum entry for module providing package xxxxxxxx 解决方案: go mod tidy 2.go mo ...

  7. missing go.sum entry for module providing package github.com/astaxie/beego

    解决方法 //执行如下代码 go build -mod=mod

  8. go build解决missing go.sum.entry

    项目场景: go build 编译项目失败 问题描述 编译失败报错:missing go.sum.entry; to add it, 原因分析: 原因:依赖包没有更新成功 解决方案: 解决方案: 1. ...

  9. golang || gin运行,出现类似这种的错误: missing go.sum entry; to add it:

    go: github.com/gin-gonic/gin@v1.7.4: missing go.sum entry; to add it: go mod download github.com/gin ...

最新文章

  1. rancher2.0安装mysql_高可用rancher集群搭建
  2. Charles(HTTP抓包工具软件)中文版
  3. Python中的shape和reshape()
  4. SQL Server 装载 msxmlsql.dll 失败的解决办法
  5. 八十七、探究最短路问题:Dijkstra算法
  6. python主流编程语言_对5种主流编程语言的吐槽!
  7. memcached 内存管理 分析(转)
  8. LINUX 下mysql主从安装与同步
  9. 程序人生:做技术,切不可沉湎于技术
  10. Golang 实现文件内容差异比较
  11. 几款实用的linux工具
  12. java线程的生命周期(图解)
  13. uni-app 小程序后端返回二进制流图片显示
  14. 传送门骑士修改服务器数据,《传送门骑士》怎么刷资源 修改存档获取资源方法...
  15. 关于LNK2000 _main 已经在 某某某.obj 中定义的问题
  16. Pytorch+LSTM+Encoder+Decoder实现Seq2Seq模型
  17. 手机分辨率大小自适应功能
  18. 怎么让热图显示基因名_教你画一个掰弯的热图(Heatmap),展示更多的基因表达量...
  19. 棋牌游戏网站支付接口那些事儿
  20. 威尔士和英格兰同属英国,但为啥还要在世界杯上进行PK?

热门文章

  1. 英语中常见的123个中国习语
  2. Pushlet 2.0.3 源码分析
  3. 微信公众号开发redirect_uri 参数错误 的解决办法,Oauth2授权重定向域名参数错误解决办法
  4. 在Nuxt.js中使用站点地图
  5. java求多项式回归_多项式回归
  6. 字符常见的编码方式详解
  7. 腾讯客户端安全/web开发实习面经
  8. 连接(Join)算法
  9. 网络安全,我懂了!你咧?
  10. springboot+Jcrop实现图片裁剪(模仿邮箱注册上传头像)