go语言用go get安装包出错:
λ go get -u github.com/spf13/viper
package golang.org/x/text/transform: unrecognized import path "golang.org/x/text/transform" (https fetch: Get https://golang.org/x/text/transform?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.)
package golang.org/x/text/unicode/norm: unrecognized import path "golang.org/x/text/unicode/norm" (https fetch: Get https://golang.org/x/text/unicode/norm?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.)
这是什么原因?
蓝灯打开了也不行,以为蓝灯不好使,然后专门申请了谷歌云vps(免费用1年)搭了个ss,结果还是不行,浏览器里面可以访问golang.org,大佬们是怎么做的?
git clone
这个项目 https://github.com/golang/text放到$GOPATH/src/golang.org/x/下面
所有golang.org/x的,都要去github.com/golang下面找
另外.
import golang.org
不代表去这个网址下载