1

I am installing chaincode on hyperledger fabric 2.5 peers, but return error

Error: chaincode install failed with status: 500 - failed to invoke backing implementation of 'InstallChaincode': could not build chaincode: docker build failed: docker image build failed: docker build failed: Error returned from build: 1 "vendor/golang.org/x/net/http2/transport.go:19:2: cannot find package "." in: /chaincode/input/src/vendor/io/fs"

my chaincode has no error, and tried other chaincodes also but same error. Vendor dependancies many time but same error.

i was trying to build hyperledger fabric network and I have already created it with fabric 2.0 successfully. But getting error with 2.5

James Z
  • 12,209
  • 10
  • 24
  • 44
rbadrana
  • 21
  • 1
  • i got the error, Although i was installing latest fabric version, I forgot to update my file base.yaml of project which was downloading fabric 2.1 images. "version: "2" services: peer-base: image: hyperledger/fabric-peer:2.1 environment:" ....................... ......................." so i updated this with " image: hyperledger/fabric-peer:2.5" and problem solved. – rbadrana Jul 17 '23 at 00:51

1 Answers1

0

Ensure that the images and binaries are of the same version. For the installation of the images, you can follow the instructions provided on the Hyperledger Documentation page:

./install-fabric.sh --fabric-version 2.5.0 docker binary

Executing this command will take care of installing all the necessary binaries and Docker images.

In a recent experience, I encountered a similar error while trying to install a chaincode that was developed using Go 1.18. To address this, I proceeded to install the latest images available. As a result of this update, the chaincode deployment process was successful.

Please note that it's essential to ensure compatibility between the versions of the chaincode and the Hyperledger Fabric components to avoid any unexpected errors during deployment and execution.