Closed Luiserebii closed 5 years ago
The book has some errors, but they should be addressed in the errata page on the Packt site. Can you check that out once before you attempt to build and run?
One point that was not made explicit in the book (but has been added to the errata) is that the fabric
code ought to be downloaded (or cloned) to the path $GOPATH/src/github.com/hyperledger/fabric/
. I assume you've done that, but do confirm.
The error you are seeing has nothing to do with Docker. Your executables are not in the system path. Check $GOPATH/src/github.com/hyperledger/fabric/build/bin
to ensure that cryptogen
and configtxgen
exist.
Hello @VRamakrishna, apologies for not checking the errata page. I looked through the Preface for help, but I guess I missed the part on looking for errata on the official website. I've made the edits from the errata, and will let you know how things go soon! Thank you so much for replying so quickly! :smiley:
Hello @VRamakrishna , I am going through the book as well as the website for Configuring and Launching the Trade Network . I did the following steps as is in same sequence - mkdir -p $GOPATH/src/github.com/hyperledger cd $GOPATH/src/github.com/hyperledger git clone https://github.com/hyperledger/fabric/ cd fabric make configtxgen cryptogen configtxlator make docker
Now ,
cd trade-finance-logistics/ network
cryptogen generate --config=./crypto-config.yaml
Error : -bash: cryptogen: command not found
Attaching screenshots for your perusal .
You haven't built the core Fabric executables. Please check out the book errata on the Packt site. There was an omission in the book (i.e., specific building steps were not mentioned, though I think it says that you need to have downloaded and built Fabric and Fabric-CA. ) But this was covered in the errata a few months ago.
Hey @VRamakrishna , followed and executed the steps mentioned at errata page .
Both cryptogen and configtxgen exist at $GOPATH/src/github.com/hyperledger/fabric/build/bin .
Then ,
cd trade-finance-logistics/network/
MacBook-Pro:network gauravjain$ cryptogen generate --config=./crypto-config.yaml
-bash: cryptogen: command not found
Hello @VRamakrishna, apologies for not checking the errata page. I looked through the Preface for help, but I guess I missed the part on looking for errata on the official website. I've made the edits from the errata, and will let you know how things go soon! Thank you so much for replying so quickly! 😃
@Luiserebii : Were you able to generate certificates by either of the methods ?
@GaJain The folder containing cryptogen
and configtxgen
needs to be in your system path. (In the PATH
environment variable, that is.) Check what the equivalent is on your Mac and add the location to the path.
@GaJain The folder containing
cryptogen
andconfigtxgen
needs to be in your system path. (In thePATH
environment variable, that is.) Check what the equivalent is on your Mac and add the location to the path. @VRamakrishna : Already set it in my ~/.bash_profile .
@GaJain I think you need to remove the space before the =
. Try export PATH=$PATH:....
@GaJain I think you need to remove the space before the
=
. Tryexport PATH=$PATH:....
Oops , my bad . Really appreciate your timely response @VRamakrishna . It's working , bravo :)
The book has some errors, but they should be addressed in the errata page on the Packt site. Can you check that out once before you attempt to build and run?
One point that was not made explicit in the book (but has been added to the errata) is that the
fabric
code ought to be downloaded (or cloned) to the path$GOPATH/src/github.com/hyperledger/fabric/
. I assume you've done that, but do confirm.The error you are seeing has nothing to do with Docker. Your executables are not in the system path. Check
$GOPATH/src/github.com/hyperledger/fabric/build/bin
to ensure thatcryptogen
andconfigtxgen
exist.
I checked. It exists. I can not run the command. Do I need to check anything else?
@Sumanbhimavarapu This is an obsolete (and unmaintained) code repository, and the edition of our book that refers to code from this repository has been superceded.
Please check out the new edition of our book (if you wish): https://www.amazon.com/Blockchain-Hyperledger-Fabric-decentralized-applications/dp/1839218754.
The code this edition refers to lies in trade-network, trade-contracts, and trade-apps. Start with trade-apps
, which imports the other two as git modules.
Thanks so much. VRamakrishna
Hello,
After having some difficulty following and executing the commands in the book on my instance of Ubuntu 16.04, I decided to attempt to follow the GitHub documentation. Unfortunately, after running "./trade.sh generate -c tradechannel" inside the network folder, I get:
I believe I followed all of the setup as written, as well, I ran
make configtxgen cryptogen configtxlator
in the fabric directory, as well asexport PATH=$PATH:$GOPATH/src/github.com/hyperledger/fabric/build/bin
to add it to the PATH. To double-check, I ran the make command again and got:Is there something wrong I might be doing? Sorry if there's something obvious I'm overlooking, I am new to using Docker. Thank you!