TiDB Make时报错:
package golang.org/x/text/encoding: unrecognized import path "golang.org/x/text/encoding"
package golang.org/x/tools/go/gcimporter: unrecognized import path "golang.org/x/tools/go/gcimporter"
package golang.org/x/tools/go/types: unrecognized import path "golang.org/x/tools/go/types"
由于GFW的原因,无法下载gcimporter源码和types源码,其实该源码在git上也有,只要下载下来,然后再GOPATH中写上相应的路径就可以通过编译,具体步骤如下 :
1. clone git上的代码到本地,比如clone到$GOPATH/src/golang.org/x/tools目录
[root@docker ~]# git clone https://github.com/golang/tools.git $GOPATH/src/golang.org/x/tools
[root@docker ~]# git clone https://github.com/golang/text.git $GOPATH/src/golang.org/x/text
2. 然后再make tidb
[root@docker ~]# cd $GOPATH/src/github.com/pingcap/tidb
[root@docker tidb]# make
此时不再报如下错误了。
package golang.org/x/tools/go/gcimporter: unrecognized import path "golang.org/x/tools/go/gcimporter"
package golang.org/x/tools/go/types: unrecognized import path "golang.org/x/tools/go/types"