Error encountered when updating chain code on a single machine in fabric1.4.0

Error: error getting chaincode code mychannel01: error getting chaincode package bytes: Error obtaining imports: command <go list -f { { join .Imports "\n"}} github.com/hyperledger/fabric/aberic/chaincode/go/chaincode_example02>: failed with error: "exit status 1"
can't load package: package github.com/hyperledger/fabric/aberic/chaincode/go/chaincode_example02: no Go files in /opt/gopath/src/github.com/hyperledger/fabric/aberic/chaincode/go/chaincode_example02

Error reported when reinstalling chaincode_example02.go file

The question prompts no Go files, so I searched the code and found that the go directory of example02 was not specified in the end.

So I modified the code and added /go and the reinstallation was successful.

/opt/gopath/src/github.com/hyperledger/fabric/peer# peer chaincode install -n mychannel01 -p github.com/hyperledger/fabric/aberic/chaincode/go/chaincode_example02/go -v 1.1

 

Guess you like

Origin blog.csdn.net/weixin_48879513/article/details/121294747