0 关键手段
重新设置相关环境变量:
GOPROXY=https://goproxy.cn; GO111MODULE=on
1 详细报错及手段
现象: 下载go依赖,module报错goproxy.baidu.com” certificate is expired
go: downloading github.com/gorilla/mux v1.8.0
bookstore/server imports
github.com/gorilla/mux: github.com/gorilla/mux@v1.8.0: Get "https://goproxy.baidu.com/github.com/gorilla/mux/@v/v1.8.0.zip": x509: “goproxy.baidu.com” certificate is expired
原因:相关依赖地址或者环境变量不存在
解决手段: go idea重新添加相关环境变量
## 复制此句到对话框
GOPROXY=https://goproxy.cn; GO111MODULE=on


在尝试下载Go依赖时遇到了`github.com/gorilla/mux`模块的问题,错误信息显示`goproxy.baidu.com`证书已过期。该问题源于依赖的下载地址或环境变量配置不正确。解决方法是通过IDE(如Go IDEA)重新设置环境变量`GOPROXY`为`https://goproxy.cn`并开启`GO111MODULE`。设置完成后,依赖下载问题应得到解决。

被折叠的 条评论
为什么被折叠?



