rddill-IBM / ZeroToBlockchain

Tutorial for Zero to Blockchain series
342 stars 924 forks source link

buildAndDeploy error #1

Closed bhavers closed 6 years ago

bhavers commented 6 years ago

Hi Bob, In Chapter 3, on executing ./buildAndDeply i get the following error: ./deployNetwork.sh: line 80: composer: command not found

I am running MacOS. Any clue?

rddill-IBM commented 6 years ago

It's possible that the script files (the ones ending in .sh) had extra characters added to them when git cloned them to your system.

First, let's make sure that the clone operation worked correctly. Open a terminal window and navigate to the Chapter03 folder and type the following command: ls *.sh and press enter. You should see deployNetwork.sh as one of the listed files. If you don't see it, then there was a problem with the clone process and I'd recommend deleting your folder and recloning from your repository.

Assuming the file exists, try the following: In your chapter03 folder, type the following command: ./deployNetwork.sh -n zerotoblockchain-network and press enter. If the command fails to execute, which I'm guessing it will, then execute the following three steps. You only need do this once.

If you have any problems, please copy the errors and add a comment to this stream.

bhavers commented 6 years ago

The scripts are available

Brams-MacBook-Pro:Chapter03 bram_havers@nl.ibm.com$ ls *.sh
createArchive.sh    deployNetwork.sh    shutdown.sh     start_rest_server.sh    startup.sh

Unfortunately running fix_scripts.sh doesn't fix the issue, see output of deployNetworks.sh below.

Brams-MacBook-Pro:Chapter03 bram_havers@nl.ibm.com$ ./deployNetwork.sh -n zerotoblockchain-network
       =====================================================
       -----> option passed for network name is: 'zerotoblockchain-network'
       =====================================================

       network deploy script for the Zero To Blockchain Series
       This has been successfully tested on OSX Sierra and Ubuntu 16.04
       This script will create your Composer archive

Parameters:
       Network Name is:  zerotoblockchain-network 
       =====================================================
       -----> deploying network
       =====================================================
./deployNetwork.sh: line 80: composer: command not found
Brams-MacBook-Pro:Chapter03 bram_havers@nl.ibm.com$ 
rddill-IBM commented 6 years ago

Right, I misunderstood the error. composer is one of the binaries which needs to be installed. This indicates that either the binaries did not install, or else docker is not running.

I just ran a quick test and this is a binary installation issue. So, you need to re-run the installation command. The installation process is described in the README.pdf file in Chapter 3. If you have never run the setup_OSX.sh command, then running that command is your starting point. Simply change to your ZeroToBlockchain folder and run the command:

If you did run this command, then you need to reinstall the binaries, because the previous installation failed. in that case, do the following:

bhavers commented 6 years ago

Great, that worked, thx.

AliCSLearner commented 6 years ago

Hi, I'm facing a similar issue except that I'm on Ubuntu inside VirtualBox.

In the last step of Chapter 3 i.e. Check out the network, I'm getting the following errors while executing ./buildAndDeploy:

./createArchive.sh: line 80: composer: command not found ./startup.sh: line 37: ./startFabric.sh: No such file or directory and other errors as well.

rddill-IBM commented 6 years ago

The error you are seeing indicates that the composer cli (command line interface) did not successfully install. This happens as part of the first of two install scripts for Ubuntu:

 - setup_Ubuntu_Part_1.sh
 - setup_Ubuntu_Part_1.sh

If you did not run these scripts, they are required and handle the set-up for your environment. If you have already run them, then please rerun the first one and let me know if you have any errors. Please remember that Composer requires 64-bit Ubuntu and the install scriipts are set to run against Ubuntu 16.04. You can check your version by typing in the following command:

dpkg --print-architecture

which should return amd64. If it returns i386 then you have installed 16-bit Ubuntu and need install the 64-bit version, rerun both setup scripts and then reclone your repository.

AliCSLearner commented 6 years ago

I had already run those scripts but re-running setup_Ubuntu_Part_1.sh worked. Thanks @rddill-IBM

rsarosh commented 5 years ago

I have Ubuntu 18.04.1 LTS and ran setup_Ubuntu_Part_1.sh but kept getting the error composer: command not found. Do i have only one option to go back to 16.04 LTS? Is there no way to upgrade these scripts to 18?

rddill-IBM commented 5 years ago

Please update your copy of the master repo to the latest release ( https://github.com/rddill-IBM/ZeroToBlockchain/releases/tag/1.6.2 ). This has support for Ubuntu 18.

rsarosh commented 5 years ago

After updating to latest 1.6.2... I kept getting the error as attached. But after couple of restarts and rerunning setup_Ubuntu_Part_1.sh and Part_2.sh fixed the error and displayed the page localhost:3000/explorer. Part_2, I have to run with sudo. Part_1 hangs at the eula notice, I believe we can kill it without harming.

Just sharing for others - Don't give up, keep trying. Huge thanks to @rddill-IBM

dockererror eula hyperladgererror

rsarosh commented 5 years ago

To get around eula notice, use tab and spaces.