go get i/o timeout 问题

问题:

go get olang.org/x/net/context
package golang.org/x/net/context: unrecognized import path "golang.org/x/net/context" (https fetch: Get https://golang.org/x/net/context?go-get=1: dial tcp 216.58.221.241:443: i/o timeout)

go get 的过程分两步

  1. 从版本库中下载包
  2. go install 安装包

定位:是由于有些包国内下载不了

解决办法:设置代理

export http_proxy='http://name:[email protected]:xx'
export https_proxy=$http_proxy

你可能感兴趣的:(go get i/o timeout 问题)