Resolve Python 2 package conflicts

Note: Perform this step after the OS upgrade to RHEL 8.10 is complete and before upgrading the Forcepoint Web Security to 8.5.7.

After upgrading the OS from RHEL 7.9 to 8.10, the system may retain Python 2 libraries introduced by the Leapp upgrade tool. These legacy Python 2 RPMs can conflict with Python dependencies required by the Forcepoint Web Security Proxy 8.5.7 installer, resulting in installation errors logged in WCGinstall.log.

Typical errors include file conflicts with python2-setuptools-wheel and python2-pip-wheel, which prevent the Forcepoint Web Security installation from proceeding.

To resolve this issue, remove all Python 2 related packages before installing Forcepoint Web Security 8.5.7. This cleanup ensures compatibility with the Python 3 environment used in RHEL 8.10.

Use the following command to remove the conflicting packages:

sudo rpm -e --nodeps $(rpm -qa | grep -E '^(python2-(libs|pip|setuptools|setuptools-wheel|pip-wheel)-|python2-2\.7\.18)')