0

I am unable to install python 2.7 in my RHEL8. It already bothers me that I cannot find the python package outside of the Centos7 repository, but when I try to install there is a ton of broken dependencies:

sudo dnf install python

gives me:

Last metadata expiration check: 0:09:54 ago on Thu 05 Aug 2021 09:35:23 PM CDT.
Error: 
 Problem: package mod_ssl-1:2.4.37-10.module+el8+2764+7127e69e.x86_64 requires libcrypto.so.1.1()(64bit), but none of the providers can be installed
  - package mod_ssl-1:2.4.37-10.module+el8+2764+7127e69e.x86_64 requires libcrypto.so.1.1(OPENSSL_1_1_0)(64bit), but none of the providers can be installed
  - package mod_ssl-1:2.4.37-10.module+el8+2764+7127e69e.x86_64 requires libssl.so.1.1()(64bit), but none of the providers can be installed
  - package mod_ssl-1:2.4.37-10.module+el8+2764+7127e69e.x86_64 requires libssl.so.1.1(OPENSSL_1_1_0)(64bit), but none of the providers can be installed
  - package mod_ssl-1:2.4.37-10.module+el8+2764+7127e69e.x86_64 requires libssl.so.1.1(OPENSSL_1_1_1)(64bit), but none of the providers can be installed
  - cannot install both openssl-libs-1:1.0.2k-19.el7.x86_64 and openssl-libs-1:1.1.1g-15.el8_3.x86_64
  - problem with installed package mod_ssl-1:2.4.37-10.module+el8+2764+7127e69e.x86_64
  - package python-libs-2.7.5-89.el7.x86_64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package python-libs-2.7.5-89.el7.x86_64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package python-libs-2.7.5-89.el7.x86_64 requires libssl.so.10()(64bit), but none of the providers can be installed
  - package python-libs-2.7.5-89.el7.x86_64 requires libssl.so.10(libssl.so.10)(64bit), but none of the providers can be installed
  - package python-libs-2.7.5-89.el7.x86_64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package python-libs-2.7.5-89.el7.x86_64 requires libcrypto.so.10(OPENSSL_1.0.2)(64bit), but none of the providers can be installed
  - package mod_ssl-1:2.4.6-95.el7.centos.x86_64 requires httpd = 2.4.6-95.el7.centos, but none of the providers can be installed
  - package python-2.7.5-89.el7.x86_64 requires libpython2.7.so.1.0()(64bit), but none of the providers can be installed
  - package python-2.7.5-89.el7.x86_64 requires python-libs(x86-64) = 2.7.5-89.el7, but none of the providers can be installed
  - package mod_http2-1.11.3-1.module+el8+2443+605475b7.x86_64 conflicts with httpd < 2.4.25-8 provided by httpd-2.4.6-95.el7.centos.x86_64
  - conflicting requests
  - problem with installed package mod_http2-1.11.3-1.module+el8+2443+605475b7.x86_64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

When I try sudo dnf install python --allowerasing then I get:

Last metadata expiration check: 0:22:11 ago on Thu 05 Aug 2021 09:35:23 PM CDT.
Error: 
 Problem: The operation would result in removing the following protected packages: dnf
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Which doesn't sound good.

sudo dnf install python --nobest --skip-broken

then:

Last metadata expiration check: 0:11:50 ago on Thu 05 Aug 2021 09:35:23 PM CDT.
Dependencies resolved.

 Problem: package mod_ssl-1:2.4.37-10.module+el8+2764+7127e69e.x86_64 requires libcrypto.so.1.1()(64bit), but none of the providers can be installed
  - package mod_ssl-1:2.4.37-10.module+el8+2764+7127e69e.x86_64 requires libcrypto.so.1.1(OPENSSL_1_1_0)(64bit), but none of the providers can be installed
  - package mod_ssl-1:2.4.37-10.module+el8+2764+7127e69e.x86_64 requires libssl.so.1.1()(64bit), but none of the providers can be installed
  - package mod_ssl-1:2.4.37-10.module+el8+2764+7127e69e.x86_64 requires libssl.so.1.1(OPENSSL_1_1_0)(64bit), but none of the providers can be installed
  - package mod_ssl-1:2.4.37-10.module+el8+2764+7127e69e.x86_64 requires libssl.so.1.1(OPENSSL_1_1_1)(64bit), but none of the providers can be installed
  - cannot install both openssl-libs-1:1.0.2k-19.el7.x86_64 and openssl-libs-1:1.1.1g-15.el8_3.x86_64
  - problem with installed package mod_ssl-1:2.4.37-10.module+el8+2764+7127e69e.x86_64
  - package python-libs-2.7.5-89.el7.x86_64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package python-libs-2.7.5-89.el7.x86_64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package python-libs-2.7.5-89.el7.x86_64 requires libssl.so.10()(64bit), but none of the providers can be installed
  - package python-libs-2.7.5-89.el7.x86_64 requires libssl.so.10(libssl.so.10)(64bit), but none of the providers can be installed
  - package python-libs-2.7.5-89.el7.x86_64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package python-libs-2.7.5-89.el7.x86_64 requires libcrypto.so.10(OPENSSL_1.0.2)(64bit), but none of the providers can be installed
  - package mod_ssl-1:2.4.6-95.el7.centos.x86_64 requires httpd = 2.4.6-95.el7.centos, but none of the providers can be installed
  - package python-2.7.5-89.el7.x86_64 requires libpython2.7.so.1.0()(64bit), but none of the providers can be installed
  - package python-2.7.5-89.el7.x86_64 requires python-libs(x86-64) = 2.7.5-89.el7, but none of the providers can be installed
  - package mod_http2-1.11.3-1.module+el8+2443+605475b7.x86_64 conflicts with httpd < 2.4.25-8 provided by httpd-2.4.6-95.el7.centos.x86_64
  - conflicting requests
  - problem with installed package mod_http2-1.11.3-1.module+el8+2443+605475b7.x86_64
==================================================================================================================================
 Package                        Arch                     Version                                  Repository                 Size
==================================================================================================================================
Skipping packages with conflicts:
(add '--best --allowerasing' to command line to force their upgrade):
 httpd                          x86_64                   2.4.6-95.el7.centos                      centos7                   2.7 M
 openssl-libs                   x86_64                   1:1.0.2k-19.el7                          centos7                   1.2 M
Skipping packages with broken dependencies:
 mod_ssl                        x86_64                   1:2.4.6-95.el7.centos                    centos7                   114 k
 python                         x86_64                   2.7.5-89.el7                             centos7                    96 k
 python-libs                    x86_64                   2.7.5-89.el7                             centos7                   5.6 M

Transaction Summary
==================================================================================================================================
Skip  5 Packages

Nothing to do.
Complete!

And of course, python is not produced. I am at my wits end. Do I have any other option to install python? (and I need python, not python3, as the executable/scripts I'm trying to run were written in python, and if alias python to python3, I obtain all sorts of errors). Are there rpm packages for python 2.7 that do not become a dependency nightmare?

2

Python 2.7 is available in the RHEL 8 AppStream repository (package python2). Please do not combine repositories for different major versions of RHEL/CentOS, this is not supported and as you can see not possible.

# dnf info python2
Available Packages
Name         : python2
Version      : 2.7.18
Release      : 6.module_el8.5.0+772+8dae0bfd
Architecture : x86_64
Size         : 109 k
Source       : python2-2.7.18-6.module_el8.5.0+772+8dae0bfd.src.rpm
Repository   : appstream
Summary      : An interpreted, interactive, object-oriented programming language
...

Note that official support for Python 2 ended in 2020 and Red Hat will provide security updates only until 2024.

1
  • Thanks for the answer! That is for sure the issue, but I did not have access to AppStream (my workstation came with redhat but without subscription). I am now working on using the no-cost RHEL subscription, but I'm getting an error where the appstream and the baseos repos fail to synchronize... Without the appstream, is it not possible to install Python2 at all? It has to be python2, I need to use a program that was written in it. I tried to use python3 with it but it didn't work.
    – Jota Be
    Aug 6 '21 at 9:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.