在安装tendermint的时候,出现如下报错:
package golang.org/x/tools/cmd/goimports: unrecognized import path "golang.org/x/tools/cmd/goimports" (https fetch: Get https://golang.org/x/tools/cmd/goimports?go-get=1: dial tcp 216.239.37.1:443: i/o timeout)
make: *** [get_tools] Error 1
这是因为golang的第三方包
golang.org/x
由于网络被墙而无法下载。解决方法如下:
golang.org/x
下的内容在github上都有备份,下载然后建立软连接即可。
git clone https://github.com/golang/sys.git $GOPATH/src/github.com/golang/sys
git clone https://github.com/golang/net.git $GOPATH/src/github.com/golang/net
git clone https://github.com/golang/text.git $GOPATH/src/github.com/golang/text
git clone https://github.com/golang/lint.git $GOPATH/src/github.com/golang/lint
git clone https://github.com/golang/tools.git $GOPATH/src/github.com/golang/tools
git clone https://github.com/golang/crypto.git $GOPATH/src/github.com/golang/crypto
ln -s $GOPATH/src/github.com/golang/ $GOPATH/src/golang.org/x
有疑问加站长微信联系(非本文作者)