安装Gin框架报错SECURITY ERROR问题解决

安装Gin框架:
执行命令go get -u github.com/gin-gonic/gin安装报错

报错信息

go: downloading github.com/gin-gonic/gin v1.8.0
go: github.com/gin-gonic/gin@v1.8.0: verifying module: checksum mismatch
        downloaded: h1:gcAUpegZ91QWGm03w0CjjJ0+rjxmG3pbBbT0aiT82s8=
        sum.golang.org: h1:4WFH5yycBMA3za5Hnl425yd9ymdw1XPm4666oab+hv4=

SECURITY ERROR
This download does NOT match the one reported by the checksum server.
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'.

切换代理解决

# 注意需要加上引号
# 设置goproxy.io代理
go env -w GOPROXY="https://goproxy.io"
# 设置GO111MOUDLE
go env -w GO111MODULE="on"

出处:www.l1mn.com

原文标题:安装Gin框架报错SECURITY ERROR问题解决

原文地址:https://www.l1mn.com/p/dzgto2.html

本文版权归作者所有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接。

评论

皖ICP备2023023451号

Copyright © L1MN.COM 联系方式:l1mnfw@163.com