Hyperledger fabric 其他go包的链码实例化失败

Hyperledger fabric 其他go包的链码实例化失败,hyperledger-fabric,hyperledger,Hyperledger Fabric,Hyperledger,需要链码实例化方面的帮助,链码实例化依赖于其他go包,如golang/protobuf和pkg/errors。下面是我在对等日志中得到的错误 2018-01-10 19:59:42.040 UTC [endorser] simulateProposal -> ERRO 405 failed to invoke chaincode name:"lscc" on transaction 380f014688cb8638b66cc9e9c8c85f1bf06ba062fbb979442483f

需要链码实例化方面的帮助,链码实例化依赖于其他go包,如golang/protobuf和pkg/errors。下面是我在对等日志中得到的错误

2018-01-10 19:59:42.040 UTC [endorser] simulateProposal -> ERRO 405 failed to invoke chaincode name:"lscc"  on transaction 380f014688cb8638b66cc9e9c8c85f1bf06ba062fbb979442483f7e9ae2139be, error: Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/Loyalty/loyalty.go:15:2: cannot find package "github.com/golang/protobuf/proto" in any of:
  /opt/go/src/github.com/golang/protobuf/proto (from $GOROOT)
  /chaincode/input/src/github.com/golang/protobuf/proto (from $GOPATH)
  /opt/gopath/src/github.com/golang/protobuf/proto
chaincode/input/src/Loyalty/loyalty.go:18:2: cannot find package "github.com/pkg/errors" in any of:
  /opt/go/src/github.com/pkg/errors (from $GOROOT)
  /chaincode/input/src/github.com/pkg/errors (from $GOPATH)
  /opt/gopath/src/github.com/pkg/errors

我已经将它们安装到对等docker上,并出现在这些
/opt/gopath/src/github.com/golang/protobuf/proto
位置

为了编译链码,对等方使用
结构ccenv
基本映像启动新容器。因此,装载到对等文件夹
/opt/gopath/src/github.com/golang/protobuf/proto
在运行时不可用

最好将
proto
包与chaincode一起提供,尝试在项目的根文件夹中运行以下命令:

govendor add github.com/golang/protobuf/proto
此命令应创建子文件夹
vendor/github.com/golang/protobuf/proto
,并用所有必要的文件填充它。
只需再次尝试安装链码,所需的依赖项将随源代码一起提供,并在运行时可用。

根据错误,它不仅需要proto包,还需要proto包位于特定位置。您的GOPATH工作正常吗?您可以直接运行go install。/。。。确保原始二进制文件在pkg中,以便在配置路径时消除错误。您好,找到解决方案了吗?