'peer' command not found hyperledger

别等时光非礼了梦想. 提交于 2019-12-13 18:12:41

问题


I'm working on this tutorial:

http://hyperledger-fabric.readthedocs.io/en/latest/getting_started.html

At the section "Create & Join Channel" at the command :

peer channel create -o orderer.example.com:7050 -c $CHANNEL_NAME -f ./channel-artifacts/channel.tx --tls $CORE_PEER_TLS_ENABLED --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem

I received this error:

No command 'peer' found, did you mean:
Command 'pee' from package 'moreutils' (universe)
Command 'beer' from package 'gerstensaft' (universe)
Command 'peel' from package 'ears' (universe)
Command 'pear' from package 'php-pear' (main)
peer: command not found


回答1:


Since you are following the guide, I suppose you are using Docker and it seems that you are not connected to the cli container, otherwise, it would have known the command "peer" (I might be mistaken).

To connect to the cli container:

docker exec -it cli bash

If this is not the problem, you can try the command from the bin folder :

/usr/local/bin

But this folder should be in the PATH environment variable, for example:

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin




回答2:


I assumed that your network is up and running.

Please check which docker image you're using to run peer commands.
run docker ps
Check the docker images name
chaincode is build and start in chaincode docker image

docker exec -it chaincode bash

and to interact and run peer commands run cli docker image

docker exec -it cli bash


来源:https://stackoverflow.com/questions/44655893/peer-command-not-found-hyperledger

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!