【问题标题】:Cannot install EncCC chaincode无法安装 EncCC 链码
【发布时间】:2018-01-27 20:35:18
【问题描述】:

我正在尝试使用 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 图像。任何建议将不胜感激。

【问题讨论】:

    标签: hyperledger-fabric hyperledger ibm-blockchain


    【解决方案1】:

    你可以使用govendor来添加你的依赖,

    执行 govendor 获取 github.com/hyperledger/fabric/core/chaincode/lib/cid

    【讨论】:

    • 为了立即对读者有所帮助(并避免Linkrot),我们更喜欢至少直接提供解决方案的可靠摘要的答案,并带有用于提供其他信息的链接。 More info on link only answers.
    猜你喜欢
    • 2017-11-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-08-04
    • 2020-10-12
    • 2023-03-30
    • 1970-01-01
    • 2021-07-26
    相关资源
    最近更新 更多