v1.8.0 - Build script on Ubuntu failed: /bin/su: invalid option -- 'y'
root@iblcore-sta-fn-eos3:/home/isysadmin/eos# ./scripts/eosio_build.sh -s EOS
EOSIO Version: 1.8.0
Mon Jul 1 03:45:56 UTC 2019
User: root
Current branch: HEAD
No installation location was specified. Please provide the location where EOSIO is installed.
Do you wish to use the default location? /root/eosio/1.8? (y/n) y
EOSIO will be installed to: /root/eosio/1.8
EOSIO has already been installed into /root/eosio/1.8... It's suggested that you eosio_uninstall.sh before re-running this script.
Do you wish to proceed anyway? (y/n) y
=====================================================================================
======================= Starting EOSIO Dependency Install ===========================
Architecture: Linux
OS name: Ubuntu
OS Version: 18.04
CPU cores: 16
Physical Memory: 65G
Disk space total: 1259G
Disk space available: 506G
[Ensuring package dependencies]
- git found!
- make found!
- bzip2 found!
- automake found!
- libbz2-dev found!
- libssl-dev found!
- doxygen found!
- graphviz found!
- libgmp3-dev found!
- autotools-dev found!
- libicu-dev found!
- python2.7 found!
- python2.7-dev found!
- python3 found!
- python3-dev found!
- autoconf found!
- libtool found!
- curl found!
- zlib1g-dev found!
- sudo found!
- ruby found!
- libusb-1.0-0-dev found!
- libcurl4-gnutls-dev found!
- pkg-config found!
- patch found!
- clang NOT found.
- llvm-4.0 found!
Do you wish to install missing dependencies? (y/n)? y
/bin/su: invalid option -- 'y'
Usage: su [options] [LOGIN]
Options:
-c, --command COMMAND pass COMMAND to the invoked shell
-h, --help display this help message and exit
-, -l, --login make the shell a login shell
-m, -p,
--preserve-environment do not reset environment variables, and
keep the same shell
-s, --shell SHELL use SHELL instead of the default in passwd
Can you run with VERBOSE=true set for me, then provide the output?
VERBOSE=true /scripts/eosio_build.sh -s EOS
I ran into this issue as well. Here is what I get with VERBOSE=true
` Do you wish to install missing dependencies? (y/n)? y
--- Executing: /bin/su /usr/bin/apt-get install -y libusb-1.0-0-dev /bin/su: invalid option -- 'y' Usage: su [options] [LOGIN] `
To get around this I just installed the missing dependencies before running the script.
looks like the script uses a wrong sudo command, it should be "sudo" not "su",
would you try to change eos/scripts/helpers/general.sh as follows and run it again?
replace this line
( [[ $NAME =~ "Ubuntu" ]] ) && eval $EXECUTION_FUNCTION $SUDO_COMMAND $APTGET $OPTIONS install -y $1
into
( [[ $NAME =~ "Ubuntu" ]] ) && eval $EXECUTION_FUNCTION sudo $APTGET $OPTIONS install -y $1
I'm curious why $SUDO_COMMAND is returning /bin/su. @tboydston @datnv-ibl, is that ENV already set on your machine to /bin/su? Can you echo $SUDO_COMMAND from your cli?
I am unable to replicate this on Ubuntu 18 and 16 fresh installs
I had done research before using SUDO_COMMAND as the name for Ubuntu, but I guess I missed this: https://askubuntu.com/questions/953485/where-do-i-find-the-sudo-command-environment-variable
We will get a fix for the next version to use a different variable name to prevent collision.