Skip to content

scripts/install.sh failed to run on ubuntu system #2893

@tercel

Description

@tercel

Describe the bug

The run fails because of an error in the apt-get command check statement.
Here is the solution:

tercel@192 bittensor % git diff  
diff --git a/scripts/install.sh b/scripts/install.sh
index 6171d187..6470a5eb 100755
--- a/scripts/install.sh
+++ b/scripts/install.sh
@@ -178,7 +178,7 @@ OS="$(uname)"
 if [[ "$OS" == "Linux" ]]; then
 
     which -s apt-get
-    if [[ $? == 0 ]] ; then
+    if [[ $? != 0 ]] ; then
         abort "This linux based install requires apt-get. To run with other distros (centos, arch, etc), you will need to manually install the requirements"
     fi
     echo """
tercel@192 bittensor % 

To Reproduce

tercel@192:~/bittensor$ ./scripts/install.sh 
This linux based install requires apt-get. To run with other distros (centos, arch, etc), you will need to manually install the requirements
tercel@192:~/bittensor$ 

Expected behavior

tercel@192:~/bittensor$ ./scripts/install.sh 

    
██████╗░██╗████████╗████████╗███████╗███╗░░██╗░██████╗░█████╗░██████╗░
██╔══██╗██║╚══██╔══╝╚══██╔══╝██╔════╝████╗░██║██╔════╝██╔══██╗██╔══██╗
██████╦╝██║░░░██║░░░░░░██║░░░█████╗░░██╔██╗██║╚█████╗░██║░░██║██████╔╝
██╔══██╗██║░░░██║░░░░░░██║░░░██╔══╝░░██║╚████║░╚═══██╗██║░░██║██╔══██╗
██████╦╝██║░░░██║░░░░░░██║░░░███████╗██║░╚███║██████╔╝╚█████╔╝██║░░██║
╚═════╝░╚═╝░░░╚═╝░░░░░░╚═╝░░░╚══════╝╚═╝░░╚══╝╚═════╝░░╚════╝░╚═╝░░╚═╝
                                                    
                                                    - Mining a new element.
    
==> This script will install:

Screenshots

No response

Environment

Ubuntu

Additional context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions