-3

我正在尝试安装链代码。我在我的链码中使用了 cid 包当我尝试安装链码时,出现以下错误:无法加载包:

package github.com/hyperledger/fabric/core/chaincode/lib/cid: cannot find package "github.com/hyperledger/fabric/core/chaincode/lib/cid" in any of:
/opt/go/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOROOT)
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOPATH)

我使用了 glide 工具(这里https://github.com/Masterminds/glide)来修复它,现在我看到另一个我无法修复的错误是:

Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/chaincode/vendor/github.com/hyperledger/fabric/core/chaincode/lib/cid/cid.go:29:2: cannot find package "github.com/hyperledger/fabric/common/attrmgr" in any of:
    /chaincode/input/src/github.com/chaincode/vendor/github.com/hyperledger/fabric/vendor/github.com/hyperledger/fabric/common/attrmgr (vendor tree)
    /chaincode/input/src/github.com/chaincode/vendor/github.com/hyperledger/fabric/common/attrmgr
    /opt/go/src/github.com/hyperledger/fabric/common/attrmgr (from $GOROOT)
    /chaincode/input/src/github.com/hyperledger/fabric/common/attrmgr (from $GOPATH)
    /opt/gopath/src/github.com/hyperledger/fabric/common/attrmgr

任何建议

4

1 回答 1

0

在您的 GOPATH 中安装结构依赖项,go get -u github.com/hyperledger/fabric

于 2019-05-20T10:00:20.840 回答