我正在尝试安装chaincode。我在chaincode中使用了cid包尝试安装chaincode时,出现以下错误:
无法加载软件包:
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)
我已经使用了滑行工具(在这里为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
有什么建议?
最佳答案
将结构依赖项安装到您的GOPATH中go get -u github.com/hyperledger/fabric