TIDB源码编译问题

环境如下:
centos 7.8
golang 1.13.14 (使用yum install 安装,未设置GOROOT等环境变量)

go env结果如下

编译最新的master分支代码(commit id = 5184a0d7060906e2022d18f11532f119f5df3f39),执行make后出现以下错误:

CGO_ENABLED=1 GO111MODULE=on go build  -tags codes  -ldflags '-X "github.com/pingcap/parser/mysql.TiDBReleaseVersion=v4.0.0-beta.2-960-g5184a0d" -X "github.com/pingcap/tidb/util/versioninfo.TiDBBuildTS=2020-08-15 07:16:23" -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitHash=5184a0d7060906e2022d18f11532f119f5df3f39" -X "github.com/pingcap/tidb/util/versioninfo.TiDBGitBranch=master" -X "github.com/pingcap/tidb/util/versioninfo.TiDBEdition=Community" ' -o bin/tidb-server tidb-server/main.go
go: go.etcd.io/etcd@v0.5.0-alpha.5.0.20191023171146-3cf2f69b5738: invalid pseudo-version: git fetch -f https://github.com/etcd-io/etcd refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /home/work/go/pkg/mod/cache/vcs/8d0c8c2e7723e01b30c002ed4e74d4605a82294f251ebd67ae6afb9f55368d27: exit status 128:
        error: RPC failed; result=18, HTTP code = 200
        fatal: The remote end hung up unexpectedly
        fatal: early EOF
        fatal: index-pack failed
make: *** [Makefile:224: server] Error 1

求问下这种怎么处理呢?是需要自己搭个梯子么

另外,编译的时候下载很多依赖的module,有办法加速么

已找到方案。

export GOPROXY="https://goproxy.cn,direct"
1赞

感谢提问!