在构建超级边缘结构时出现以下错误

时间:2017-03-04 19:57:48

标签: hyperledger hyperledger-fabric

在一段时间后运行以下命令来构建超级聚合器我在终端中看到以下错误

$ make dist-clean all

build/bin/peer
CGO_CFLAGS=" " GOBIN=/usr/share/go-1.6/src/github.com/hyperledger/fabric/build/bin go install -ldflags "-X github.com/hyperledger/fabric/common/metadata.Version=0.7.0-snapshot-29d7fc0 -X github.com/hyperledger/fabric/common/metadata.BaseVersion=0.3.0 -X github.com/hyperledger/fabric/common/metadata.BaseDockerLabel=org.hyperledger.fabric" github.com/hyperledger/fabric/peer
/usr/lib/go-1.6/src/github.com/hyperledger/fabric/core/chaincode/ccproviderimpl.go:20:2: cannot find package "context" in any of:
    /usr/lib/go-1.6/src/github.com/hyperledger/fabric/vendor/context (vendor tree)
    /usr/lib/go-1.6/src/vendor/context
    /usr/share/go/src/github.com/hyperledger/fabric/vendor/context
    /usr/share/go/src/vendor/context
    /usr/lib/go-1.6/src/context (from $GOROOT)
    /usr/share/go/src/context (from $GOPATH)
Makefile:177: recipe for target 'build/bin/peer' failed
make: *** [build/bin/peer] Error 1

3 个答案:

答案 0 :(得分:1)

构建和测试结构的方法有很多,您需要为此问题提供一些上下文才有机会得到回答。

但是,为了使过程短路,请允许我提供一些有用的文档,在尝试使用最新的结构代码之前应该阅读这些文档:

https://github.com/hyperledger/fabric/blob/master/docs/source/install_instantiate.rst

https://github.com/hyperledger/fabric/blob/master/docs/source/dev-setup/build.rst

答案 1 :(得分:1)

问题与此有关:#23672 它影响Go版本1.8.7,1.9.4和1.10rc2

我将golang版本从1.9.4降级到1.9,这对我有用。

答案 2 :(得分:0)

更新您的golang版本,1.7.0+可能会有帮助。