请告诉我如何解决链代码不存在的路径



我做了什么:进入cli容器。制作频道。加入频道。

我在做什么:对等链代码安装。

我想安装我制作的Chaincode,它在GitHub上。所以我认为它可以像示例02一样安装。

我没有更改docker-compose-cli.yaml和其他代码。

当我使用命令"peer Chaincode install"时,它会说"链代码的路径不存在"。

root@7fdb5cf9a746:/opt/gopath/src/github.com/hyperledger/fabric/peer# 
peer chaincode install -n mycc -v 1.0 -p github.com/Gela-Gunp/OriginChaincodeForMe
2019-01-22 07:48:52.599 UTC [msp] GetLocalMSP -> DEBU 001 Returning existing local MSP
2019-01-22 07:48:52.599 UTC [msp] GetDefaultSigningIdentity -> DEBU 002 Obtaining default signing identity
2019-01-22 07:48:52.599 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 003 Using default escc
2019-01-22 07:48:52.599 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 004 Using default vscc
Error: Error getting chaincode code chaincode: path to chaincode does not exist: github.com/Gela-Gunp/OriginChaincodeForMe

也许我应该在安装Chaincode之前做点什么。但我不知道那是什么。

@geline,在您的链代码安装命令中,"-p"标志指示链代码的源路径(注意:本地路径)。。

它可以像您的命令一样,但您应该将这些目录安装在cli容器中。另外,不要忘记注意GOPATHenv变量:p

请仔细阅读结构链代码参考文档:面向开发人员的Fabric Chaincode

相关内容

最新更新