Hyperledger Fabric:对等链码实例化错误 [英] Hyperledger Fabric: peer chaincode instantiate error

查看:90
本文介绍了Hyperledger Fabric:对等链码实例化错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

启动容器时出错:无法生成特定于平台的泊坞窗 生成:从生成返回错误:1无法加载包:包 ../../bin/github.com/hyperledger/fabric/chaincode/marbles:打开 /bin/github.com/hyperledger/fabric/chaincode/marbles:没有此类文件或 目录.

Error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "can't load package: package ../../bin/github.com/hyperledger/fabric/chaincode/marbles: open /bin/github.com/hyperledger/fabric/chaincode/marbles: no such file or directory.

我看到它正在寻找一个相对目录.相对于什么? chaincode安装很好.如果安装了链码,为什么找不到实例化的链码? 1个同peer. 1个单独订购者.频道加入得很好.

I see it is looking for a relative directory. relative to what? chaincode install was fine. If the chaincode is installed, why can it not be found for instantiate? 1 peer. 1 solo orderer. channel joined fine.

推荐答案

安装链式代码并不意味着您已经正确映射了链式代码路径,

Chaincode install doesn't mean you have correctly mapped your chaincode path,

peer chaincode install -p {path} -n {} -v {}

Chaincode实例化构建并实例化您的链码.

Chaincode instantiate builds and instantiate your chaincode.

peer chaincode instantiate -n {} -v {} -c {} -C {}

  • 在docker compose文件中,仔细检查以下内容的卷/链码映射: cli
  • 在安装链码时使用实际路径.
    • In docker compose file double check the volumes/chaincode mapping of the cli.
    • Use actual path when installing chaincode.
    • 这篇关于Hyperledger Fabric:对等链码实例化错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆