当前位置: 首页 > 工具软件 > X.Org > 使用案例 >

拉取golang.org/x/crypto包失败

慕弘伟
2023-12-01

问题:go项目在run或者build的时候,会报如下的错:

golang.org/x/crypto@v0.0.0-20190325154230-a5d413f7728c: 
Get "https://proxy.golang.org/golang.org/x/crypto/@v/v0.0.0-20190325154230-a5d413f7728c.mod": 
dial tcp 216.58.200.49: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.

解决

进入GOPATH的目录/src/golang.org/x/下,如果不存在,则手动创建,然后手动下载如下的包:

mkdir -p $GOPATH/src/golang.org/x/
cd !$
git clone https://github.com/golang/net.git
git clone https://github.com/golang/sys.git
git clone https://github.com/golang/tools.git
git clone https://github.com/golang/crypto.git
 类似资料: