ERROR: hyperledger/fabric:make gotools: unrecognized import path "golang.org/x/tools/go/gcexportdata"

huangapple go评论102阅读模式
英文:

ERROR: hyperledger/fabric:make gotools: unrecognized import path "golang.org/x/tools/go/gcexportdata"

问题

当创建对等体时,无法访问build/docker/gotools/bin/protoc-gen-go,因此我尝试构建gotools,但失败了,以下是日志:

mkdir -p build/bin
cd gotools && make install BINDIR=/root/gocode/bin
make[1]: 进入目录 '/root/gocode/src/github.com/hyperledger/fabric/gotools'
make[2]: 进入目录 '/root/gocode/src/github.com/hyperledger/fabric/gotools'
正在构建 github.com/golang/lint/golint -> golint
包 golang.org/x/tools/go/gcexportdata: 无法识别的导入路径 "golang.org/x/tools/go/gcexportdata"(https获取:获取 https://golang.org/x/tools/go/gcexportdata?go-get=1: net/http: TLS 握手超时)
Makefile:47: 目标 'gotool.golint' 失败

如何解决这个问题?请帮助我,谢谢!

英文:

When make peer, it can't access build/docker/gotools/bin/protoc-gen-go, so I make gotools, but fail, here is the log:

mkdir -p build/bin
cd gotools && make install BINDIR=/root/gocode/bin
make[1]: Entering directory '/root/gocode/src/github.com/hyperledger/fabric/gotools'
make[2]: Entering directory '/root/gocode/src/github.com/hyperledger/fabric/gotools'
Building github.com/golang/lint/golint -> golint
package golang.org/x/tools/go/gcexportdata: unrecognized import path "golang.org/x/tools/go/gcexportdata" (https fetch: Get https://golang.org/x/tools/go/gcexportdata?go-get=1: net/http: TLS handshake timeout)
Makefile:47: recipe for target 'gotool.golint' failed

How to solve this issue? Please help me, thank you!

答案1

得分: 1

请按照以下步骤操作:

#mkdir -p gotools/build/gopath/src/golang.org/x/

#cd gotools/build/gopath/src/golang.org/x/

#git clone https://github.com/golang/tools.git

#cd $GOPATH/src/github.com/hyperledger/fabric/

然后再次执行以下命令:

#make gotools
英文:

Try to following the steps:

#mkdir -p gotools/build/gopath/src/golang.org/x/

#cd gotools/build/gopath/src/golang.org/x/

#git clone https://github.com/golang/tools.git

#cd $GOPATH/src/github.com/hyperledger/fabric/

Then make again

#make gotools

huangapple
  • 本文由 发表于 2017年5月26日 18:17:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/44199052.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定