From 272c89282182d9d6e76fd666694dad9225768203 Mon Sep 17 00:00:00 2001 From: Yuan Date: Fri, 9 Jun 2023 09:28:53 +0800 Subject: [PATCH] update dnf cache on centos (#302) Signed-off-by: Yuan Zhou --- scripts/setup-centos7.sh | 4 ++++ scripts/setup-centos8.sh | 2 ++ 2 files changed, 6 insertions(+) diff --git a/scripts/setup-centos7.sh b/scripts/setup-centos7.sh index f7330ed47222..cd9ed08b1b9d 100755 --- a/scripts/setup-centos7.sh +++ b/scripts/setup-centos7.sh @@ -231,6 +231,8 @@ function install_velox_deps { run_and_time install_conda } +$SUDO dnf makecache + # dnf install dependency libraries dnf_install epel-release dnf-plugins-core # For ccache, ninja # PowerTools only works on CentOS8 @@ -252,6 +254,8 @@ dnf_install gettext-devel texinfo help2man # Activate gcc9; enable errors on unset variables afterwards. # GCC9 install via yum and devtoolset # dnf install gcc-toolset-9 only works on CentOS8 + +$SUDO yum makecache yum_install centos-release-scl yum_install devtoolset-9 source /opt/rh/devtoolset-9/enable || exit 1 diff --git a/scripts/setup-centos8.sh b/scripts/setup-centos8.sh index 24320b292967..41ed7d03a611 100755 --- a/scripts/setup-centos8.sh +++ b/scripts/setup-centos8.sh @@ -32,6 +32,8 @@ function dnf_install { $SUDO dnf install -y -q --setopt=install_weak_deps=False "$@" } +$SUDO dnf makecache + dnf_install epel-release dnf-plugins-core # For ccache, ninja $SUDO dnf config-manager --set-enabled powertools dnf_install ninja-build ccache gcc-toolset-9 git wget which libevent-devel \