错误内容:
Error: error getting chaincode code enccc: error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/bccsp: command <go list -f {{ join .Deps “\n”}} github.com/hyperledger/fabric/bccsp>: failed with error: “exit status 1”
can’t load package: package github.com/hyperledger/fabric/bccsp: cannot find package “github.com/hyperledger/fabric/bccsp” in any of:
/opt/go/src/github.com/hyperledger/fabric/bccsp (from $GOROOT)
/opt/gopath/src/github.com/hyperledger/fabric/bccsp (from $GOPATH)
解决方案:
1、进入链码所在目录中,本文中的链码目录为/chaincode/go/encc_example
。
2、上述问题的产生是因为没有依赖包,找不到这个依赖包,也无法自行下载,所以需要我们手动处理一下,在encc_example
目录下执行步骤3
中的命令。
3、
govendor init
govendor add +external
4、然后再进行链码的安装,就可以成功解决那个问题