安装beego时报错:go get: module github.com/beego/bee/v2: Get

今天在安装beego的时候,运行go get -u github.com/beego/bee/v2,报错信息如下:

go get: module github.com/beego/bee/v2: Get "https://proxy.golang.org/github.com/beego/bee/v2/@v/list": dial tcp 172.217.31.241:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

解决办法:

设置代理地址: https://goproxy.cn

运行命令即可:

go env -w GOPROXY=https://goproxy.cn

然后在运行go get 就可以正常下载了。

顺带一提:如果安装的速度过慢,可尝试以下办法:

修改本机hosts文件,添加下面2行代码即可。

140.82.114.3 github.com
199.232.5.194 github.global.ssl.fastly.net

参考网址:

https://m.php.cn/blog/detail/25007.html

https://blog.csdn.net/weixin_41782332/article/details/103226874

  • 6
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值