windows 安装go依赖包失败解决

2,282 阅读1分钟

windows 安装go依赖包失败解决

自己搭的梯子下载go依赖包,但是经常超时或者提示失败

go get -u -v github.com/mdempsky/gocode
go: finding github.com/mdempsky/gocode latest
Fetching https://golang.org/x/tools/go/gcexportdata?go-get=1
https fetch failed: Get https://golang.org/x/tools/go/gcexportdata?go-get=1: dial tcp 216.239.37.1: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.
Fetching https://golang.org/x/tools/go?go-get=1

尝试方法:
1、www.cnblogs.com/OctoptusLia… 我本地还没有奏效
2、goproxy.io/ , 用 export GOPROXY=https://goproxy.io 可以了