无法安装EncCC链码

时间:2018-01-27 20:35:18

标签: hyperledger-fabric hyperledger ibm-blockchain

我正在尝试使用EncCC链代码测试1.1版中引入的Fabric链代码加密功能。 github上的教程从假设已经安装了chaincode的那一刻开始。我设法通过导入bcssp和ext / entities来安装链代码,但实例化失败并显示以下消息:

Error: Error endorsing chaincode: rpc error: code = Unknown desc = error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/enccc_example/vendor/github.com/hyperledger/fabric/bccsp/pkcs11/impl.go:31:2: cannot find package "github.com/miekg/pkcs11" in any of:
        /chaincode/input/src/enccc_example/vendor/github.com/miekg/pkcs11 (vendor tree)
        /opt/go/src/github.com/miekg/pkcs11 (from $GOROOT)
        /chaincode/input/src/github.com/miekg/pkcs11 (from $GOPATH)
        /opt/gopath/src/github.com/miekg/pkcs11 chaincode/input/src/enccc_example/vendor/github.com/hyperledger/fabric/bccsp/pkcs11/pkcs11.go:20:2: cannot find package "github.com/op/go-logging" in any of:
        /chaincode/input/src/enccc_example/vendor/github.com/op/go-logging (vendor tree)
        /opt/go/src/github.com/op/go-logging (from $GOROOT)
        /chaincode/input/src/github.com/op/go-logging (from $GOPATH)
        /opt/gopath/src/github.com/op/go-logging chaincode/input/src/enccc_example/vendor/github.com/hyperledger/fabric/bccsp/sw/conf.go:25:2: cannot find package "golang.org/x/crypto/sha3" in any of:
        /chaincode/input/src/enccc_example/vendor/golang.org/x/crypto/sha3 (vendor tree)
        /opt/go/src/golang.org/x/crypto/sha3 (from $GOROOT)
        /chaincode/input/src/golang.org/x/crypto/sha3 (from $GOPATH)
        /opt/gopath/src/golang.org/x/crypto/sha3 chaincode/input/src/enccc_example/vendor/github.com/hyperledger/fabric/protos/peer/admin.pb.go:80:2: cannot find package "golang.org/x/net/context" in any of:
        /chaincode/input/src/enccc_example/vendor/golang.org/x/net/context (vendor tree)
        /opt/go/src/golang.org/x/net/context (from $GOROOT)
        /chaincode/input/src/golang.org/x/net/context (from $GOPATH)
        /opt/gopath/src/golang.org/x/net/context chaincode/input/src/enccc_example/vendor/github.com/hyperledger/fabric/protos/peer/admin.pb.go:81:2: cannot find package "google.golang.org/grpc" in any of:
        /chaincode/input/src/enccc_example/vendor/google.golang.org/grpc (vendor tree)
        /opt/go/src/google.golang.org/grpc (from $GOROOT)
        /chaincode/input/src/google.golang.org/grpc (from $GOPATH)
        /opt/gopath/src/google.golang.org/grpc

我尝试将这些库导入CLI和同行,但没有成功。我目前正在运行1.1-alpha图像。任何建议都将不胜感激。

1 个答案:

答案 0 :(得分:0)

您可以使用govendor为您添加依赖项,

做govendor fetch github.com/hyperledger/fabric/core/chaincode/lib/cid