英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论