状态:500,消息:无法获取链码包

问题描述 投票:2回答:2
root@93272a1da547:/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode instantiate -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem -C mychannel -n fabrep -v 1.0 -c '{"Args":["init","a", "100", "b","200"]}' -P "OR ('Org1MSP.member','Org2MSP.member')"

在尝试实例化我的链代码时,我收到以下错误:

2018-06-19 09:03:09.526 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 001 Using default escc
2018-06-19 09:03:09.526 UTC [chaincodeCmd] checkChaincodeCmdParams -> INFO 002 Using default vscc
Error: Error endorsing chaincode: rpc error: code = Unknown desc = chaincode error (status: 500, message: cannot get package for chaincode (fabrep:1.0))

有谁能说出这意味着什么?以及如何解决错误?

hyperledger-fabric
2个回答
0
投票
  • 首先检查对等体上是否安装了链码
  • $ peer chaincode list --installed
  • 并使用已安装的链代码的确切名称运行instantiate命令

0
投票

在尝试实例化之前,请确保首先在对等端上安装链代码。

使用install命令:

peer chaincode install ...

您可以使用此处的文档作为指南:https://hyperledger-fabric.readthedocs.io/en/release-1.1/commands/peerchaincode.html#peer-chaincode-install

© www.soinside.com 2019 - 2024. All rights reserved.