Hyperledger fabric HLF 1.0.2-反序列化stub.GetCreator()提供的SerializedDidEntity
这个过程描述得很好。 不幸的是,当我试图在我的链码中导入msp包(github.com/hyperledger/fabric/protos/msp)时,我在安装阶段收到一个错误:Hyperledger fabric HLF 1.0.2-反序列化stub.GetCreator()提供的SerializedDidEntity,hyperledger-fabric,Hyperledger Fabric,这个过程描述得很好。 不幸的是,当我试图在我的链码中导入msp包(github.com/hyperledger/fabric/protos/msp)时,我在安装阶段收到一个错误: Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/protos/msp:
Error: Error getting chaincode code chaincode: Error getting chaincode package bytes: Error obtaining dependencies for github.com/hyperledger/fabric/protos/msp: <go, [list -f {{ join .Deps "\n"}} github.com/hyperledger/fabric/protos/msp]>: failed with error: "exit status 1"
can't load package: package github.com/hyperledger/fabric/protos/msp: cannot find package "github.com/hyperledger/fabric/protos/msp" in any of:
/opt/go/src/github.com/hyperledger/fabric/protos/msp (from $GOROOT)
/opt/gopath/src/github.com/hyperledger/fabric/protos/msp (from $GOPATH)
编辑:Artem是正确的,错误来自Install命令-我已经更新了描述。首先,我认为您遇到的错误发生在安装阶段,而不是实例化,因为它似乎是一个编译错误: 错误:获取链码时出错链码:获取链码包字节时出错:获取github.com/hyperledger/fabric/protos/msp的依赖项时出错::失败,错误为:“退出状态1” 无法加载包:包github.com/hyperledger/fabric/protos/msp:在以下任意位置找不到包“github.com/hyperledger/fabric/protos/msp”: /opt/go/src/github.com/hyperledger/fabric/protos/msp(来自$GOROOT) /opt/gopath/src/github.com/hyperledger/fabric/protos/msp(来自$gopath) 为了解决此问题,您需要在链码中输入供应商缺少的包,例如:
govendor init
及
很可能您还需要提供其他依赖项
govendor init
govendor fetch github.com/hyperledger/fabric/protos/msp