How to fix RHEL/CentOS 8 repository installation issue
elif [[ ${OS} == *"Red Hat"* ]]; then
{
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y --enablerepo="epel" python3-pip nc sshpass jq libselinux-python3
sudo python3 -m pip install --upgrade --force-reinstall pip==21.1.3
sudo ln -sf /usr/local/bin/pip /usr/bin/pip
sudo python3 -m pip install configparser zipp
} >>sisense-ansible.log 2>&1
fi
With:
elif [[ ${OS} == *"Red Hat"* ]]; then
if [[ $VER == "7."* ]]; then
{
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y --enablerepo="epel" python3-pip nc sshpass jq libselinux-python3
sudo python3 -m pip install --upgrade --force-reinstall pip==21.1.3
sudo ln -sf /usr/local/bin/pip /usr/bin/pip
sudo python3 -m pip install configparser zipp
} >>sisense-ansible.log 2>&1
else
{
sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf install -y --enablerepo="epel" python3-pip nc sshpass jq libselinux-python3
sudo python3 -m pip install --upgrade --force-reinstall pip==21.1.3
sudo ln -sf /usr/local/bin/pip /usr/bin/pip
sudo python3 -m pip install configparser zipp
} >>sisense-ansible.log 2>&1
fi
fi
For CentOS replace the next section:
elif [[ ${OS} == *"CentOS"* ]]; then
{
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y epel-release --enablerepo="epel" python3-pip nc sshpass jq libselinux-python3
sudo python3 -m pip install --upgrade --force-reinstall pip==21.1.3
sudo ln -sf /usr/local/bin/pip /usr/bin/pip
sudo python3 -m pip install configparser zipp
} >>sisense-ansible.log 2>&1
fi
With:
elif [[ ${OS} == *"CentOS"* ]]; then
if [[ $VER == "7."* ]]; then
{
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
sudo yum install -y epel-release --enablerepo="epel" python3-pip nc sshpass jq libselinux-python3
sudo python3 -m pip install --upgrade --force-reinstall pip==21.1.3
sudo ln -sf /usr/local/bin/pip /usr/bin/pip
sudo python3 -m pip install configparser zipp
} >>sisense-ansible.log 2>&1
else
{
sudo subscription-manager repos --enable codeready-builder-for-rhel-9-$(arch)-rpms
sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
sudo dnf install -y epel-release --enablerepo="epel" python3-pip nc sshpass jq libselinux-python3
sudo python3 -m pip install --upgrade --force-reinstall pip==21.1.3
sudo ln -sf /usr/local/bin/pip /usr/bin/pip
sudo python3 -m pip install configparser zipp
} >>sisense-ansible.log 2>&1
fi
fi
This should be enough for a successful installation.
0 comments