diff --git a/utils/common.sh b/utils/common.sh index 03d5125f..ad1d1187 100644 --- a/utils/common.sh +++ b/utils/common.sh @@ -173,6 +173,7 @@ function get_os_information() { source "$OS_RELEASE" export DISTRO_NAME="$ID" + export DISTRO_VERSION_ID="$VERSION_ID" export DISTRO_VERSION="$VERSION" export KERNEL PYTHON else @@ -189,8 +190,9 @@ function required_packages() { echo -ne "➤ Validating installer package requirements... " case "$DISTRO_NAME" in debian | ubuntu) + [ "$DISTRO_VERSION_ID" -gt 11 ] && python_version="3.11" || python_version="3" apt-get update &>>"$LOG_FILE" - apt-get install --no-install-recommends -y python3.11 python3.11-dev python3-pip python3.11-venv whiptail expect jq &>>"$LOG_FILE" + apt-get install --no-install-recommends -y "python${python_version}" "python${python_version}-dev" python3-pip "python${python_version}-venv" whiptail expect jq &>>"$LOG_FILE" ;; fedora) dnf install -y python3.11 python3.11-devel python3-pip python3-virtualenv newt expect jq &>>"$LOG_FILE"