From c95c593174d77f77a41be88258a78d088e4f1daf Mon Sep 17 00:00:00 2001 From: Patrick Lewis Date: Mon, 31 May 2021 09:19:45 -0700 Subject: [PATCH] fix(Bash/Ubuntu): allow Boost install on minimal ubuntu 20.04 installs (#6037) --- apps/installer/includes/os_configs/ubuntu.sh | 38 ++++++++++---------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/apps/installer/includes/os_configs/ubuntu.sh b/apps/installer/includes/os_configs/ubuntu.sh index 949c8d0bc..33babf54e 100644 --- a/apps/installer/includes/os_configs/ubuntu.sh +++ b/apps/installer/includes/os_configs/ubuntu.sh @@ -1,27 +1,29 @@ +if ! command -v lsb_release &>/dev/null ; then + sudo apt-get install -y lsb-release +fi -# if ! command -v lsb_release &>/dev/null ; then -# sudo apt-get install -y lsb-release -# fi +UBUNTU_VERSION=$(lsb_release -sr); -# UBUNTU_VERSION=$(lsb_release -sr); - -# Added repo for newest lib -sudo add-apt-repository -y ppa:mhier/libboost-latest sudo apt update # shared deps -sudo apt-get -y install make cmake clang curl unzip libmysqlclient-dev libace-dev ccache google-perftools - -# Insstall boost 1.74 from ppa:mhier/libboost-latest for all os versions -sudo apt-get -y install libboost1.74-dev +sudo apt-get -y install ccache clang cmake curl google-perftools libace-dev libmysqlclient-dev make unzip if [[ $CONTINUOUS_INTEGRATION || $DOCKER ]]; then - sudo apt-get -y install build-essential libtool cmake-data openssl libgoogle-perftools-dev \ - libssl-dev libmysql++-dev libreadline6-dev zlib1g-dev libbz2-dev mysql-client \ - libncurses5-dev + sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt-get -y install build-essential cmake-data \ + libboost1.74-dev libbz2-dev libncurses5-dev libmysql++-dev libgoogle-perftools-dev libreadline6-dev libssl-dev libtool mysql-client \ + openssl zlib1g-dev else - sudo apt-get install -y git gcc g++ gdb gdbserver \ - libssl-dev libbz2-dev libreadline-dev libncurses-dev \ - mysql-server libace-6.* + case $UBUNTU_VERSION in + "20.04") + sudo apt-get install -y g++ gdb gdbserver gcc git \ + libace-6.* libboost-all-dev libbz2-dev libncurses-dev libreadline-dev \ + libssl-dev mysql-server + ;; + *) + sudo add-apt-repository -y ppa:mhier/libboost-latest && sudo apt update && sudo apt-get install -y g++ gdb gdbserver gcc git \ + libace-6.* libboost-all-dev libbz2-dev libncurses-dev libreadline-dev \ + libssl-dev mysql-server + ;; + esac fi -