'Hyperledger Fabric cryptogen and configtxgen not working

I am trying to create the "crypto matrial" of my hyperledger fabric network using the cryptogen command line but I get "command not found" as result

My command line : user@ubuntu:~/go/src/github.com/*****/fabric-samples/bin$ cryptogen generate --config=./crypto-config.yam cryptogen: command not found

Please i need help



Solution 1:[1]

This happens because cryptogen binary is not available in PATH. Download the cryptogen and move the binary to some location in the PATH. Instructions for the same are available in fabric documentation.

Solution 2:[2]

Go to your test-network folder. After that set the PATH of hyperledger-fabric binary and config file.

export PATH=${PWD}/../bin:$PATH
export FABRIC_CFG_PATH=$PWD/../config/

These commands are for the fabric-samples test network. You have modified it according to your folder structure. After that try to run the below command

cryptogen version

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Basil K Y
Solution 2 Piyusha Patel