尝试安装Go依赖时出现超时错误。

huangapple go评论70阅读模式
英文:

timeout when I try to install go dependencies

问题

我尝试使用go run main.go运行我的Golang项目。
我收到以下错误信息:

go: 正在下载 github.com/package
main.go:13:2: github.com/package: 获取 "https://proxy.golang.org/github.com/package" 时出错: proxyconnect tcp: dial tcp: lookup http on x.x.x.x:x: read udp x.x.x.x:x->x.x.x.x:x: i/o timeout

请帮助我解决这个问题。

英文:

I try to run my golang project with go run main.go.
I receive:

go: downloading github.com/package
main.go:13:2: github.com/package: Get "https://proxy.golang.org/github.com/package": proxyconnect tcp: dial tcp: lookup http on x.x.x.x:x: read udp x.x.x.x:x->x.x.x.x:x: i/o timeout

Help me please resolve this problem.

答案1

得分: 12

导出 GOPROXY=direct 并重新启动,似乎 proxy.golang.org 最近遇到了一些困难。希望对你有帮助。

英文:

export GOPROXY=direct
and relaunch, seems like proxy.golang.org have some difficulties recently
HTH

huangapple
  • 本文由 发表于 2022年6月23日 16:10:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/72726715.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定