Using hyperledge fabric , i encount ‘’Scripts / createchannel.sh: line 40: osnadmin: command not found”

Viewed 359

when i want to use './network createChannel' coomand to create channel ,i got this question,but i check the line 40 of '../script/createChannel.sh' ,i can't find what cause this problem. If someone have solve the problem,i sincerely hope you can help me. Thank you.(Because english is not my mother tongue, please forgive me for any improper expression)

enter image description here

2 Answers

The command osnadmin appears after the 2.3 version, so you can check the fabric version and download the suitable fabric binaries and add it to the PATH.

You can use below codes to download binaries only.

git clone https://github.com/hyperledger/fabric.git 
cd ./fabric/scripts
./bootstrap.sh <fabric-version> <fabric-ca-version> -s

If you are using the fabric-samples/test-network, before launching any script, you need to set up the environmental variables to the config and /bin. Did you set these up?

export PATH=${test-network-dir-path}/../bin:$PATH
export FABRIC_CFG_PATH=${test-network-dir-path}/../config/
Related