美文网首页
golang: go build遇到报错

golang: go build遇到报错

作者: 春木橙云 | 来源:发表于2021-01-12 15:58 被阅读0次

    中国墙是国内程序员进步路上的最大绊脚石

    编译go的过程中遇到这样的报错:
    module ***: Get "https://proxy.golang.org/***": dial tcp 172.217.160.113: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.
    你可以试着访问一下proxy.golang.org,怎么样,访问不了吧,没错,这是被我们伟大的长城防火墙给屏蔽了,你需要改成我们国内可用的代理地址,直接在命令行执行
    go env -w GOPROXY=https://goproxy.cn

    THE END

    相关文章

      网友评论

          本文标题:golang: go build遇到报错

          本文链接:https://www.haomeiwen.com/subject/xjheaktx.html