当前位置:   article > 正文

解决使用go mod和git管理代码导致的go.sum校验和不匹配问题_go.sum is out of sync with go.mod. please update i

go.sum is out of sync with go.mod. please update it by applying the quick fi

错误如下:

go: downloading github.com/flosch/pongo2/v4 v4.0.0
verifying github.com/flosch/pongo2/v4@v4.0.0: checksum mismatch
	downloaded: h1:89EuG/yHG6NE7KFmeg5GwnHYiiPQQXA1SGr12O9umVE=
	go.sum:     h1:6eZe8NSNxtTTGwXgJqqXiiLEDAj7CvkwiYrZFQRW6cQ=

SECURITY ERROR
This download does NOT match an earlier download recorded in go.sum.
The bits may have been replaced on the origin server, or an attacker may
have intercepted the download attempt.

For more information, see 'go help module-auth'.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

执行下面命令

go clean -modcache
go mod tidy
  • 1
  • 2

若不奏效,可删除文件go.mod,go.sum,执行go mod init,并重新执行以上命令

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/211745
推荐阅读
相关标签
  

闽ICP备14008679号