Go mod 使用问题

2023年 1月 4日 17.0k 0

1. 升级 Go 版本之后 go.sum 版本不匹配

执行命令 go build 报错。错误提示:

missing go.sum entry for module providing package golang.org/x/time/rate; to add

解决办法:在 go build 之前更新 go.sum,执行命令 go mod tidy

2. tls 错误

执行命令 go mod download 报错。错误提示:

fatal: unable to access 'https://github.com/agiledragon/gomonkey/': GnuTLS recv error (-110): The TLS connection was non-properly terminated.

解决办法:禁用证书校验执行命令,export GIT_SSL_NO_VERIFY=1git config --global http.sslVerify false

3. goproxy 不支持 latest

执行命令 go mod download 报错。错误提示:

github.com/agiledragon/gomonkey: no matching versions for query "latest"

解决办法:换其他 goproxy 代理。

相关文章

KubeSphere 部署向量数据库 Milvus 实战指南
探索 Kubernetes 持久化存储之 Longhorn 初窥门径
征服 Docker 镜像访问限制!KubeSphere v3.4.1 成功部署全攻略
那些年在 Terraform 上吃到的糖和踩过的坑
无需 Kubernetes 测试 Kubernetes 网络实现
Kubernetes v1.31 中的移除和主要变更

发布评论