Installing python36-devel on rhel7 failing

Aks picture Aks · Aug 14, 2019 · Viewed 8.2k times · Source

Trying to install python36-devel on RHEL7, ends up getting error

Tried resolving the dependencies as stated in error, but no help.

Also tried this How to install python3-devel on red hat 7, which also ended up in same error

yum install python36-devel

Error:

Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Resolving Dependencies
--> Running transaction check
---> Package python36-devel.x86_64 0:3.6.8-1.el7 will be installed
--> Processing Dependency: python36 = 3.6.8-1.el7 for package: python36-devel-3.6.8-1.el7.x86_64
Package python36-3.6.8-1.el7.x86_64 is obsoleted by python3-3.6.8-10.el7.x86_64 which is already installed
--> Processing Dependency: python36-libs(x86-64) = 3.6.8-1.el7 for package: python36-devel-3.6.8-1.el7.x86_64
Package python36-libs-3.6.8-1.el7.x86_64 is obsoleted by python3-libs-3.6.8-10.el7.x86_64 which is already installed
--> Finished Dependency Resolution
Error: Package: python36-devel-3.6.8-1.el7.x86_64 (epel)
           Requires: python36-libs(x86-64) = 3.6.8-1.el7
           Installed: python3-libs-3.6.8-10.el7.x86_64 (@rhui-REGION-rhel-server-releases)
               python36-libs(x86-64) = 3.6.8-10.el7
           Available: python36-libs-3.6.8-1.el7.x86_64 (epel)
               python36-libs(x86-64) = 3.6.8-1.el7
Error: Package: python36-devel-3.6.8-1.el7.x86_64 (epel)
           Requires: python36 = 3.6.8-1.el7
           Installed: python3-3.6.8-10.el7.x86_64 (@rhui-REGION-rhel-server-releases)
               python36 = 3.6.8-10.el7
           Available: python36-3.6.8-1.el7.x86_64 (epel)
               python36 = 3.6.8-1.el7
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Answer

Chris Maes picture Chris Maes · Aug 16, 2019

yum doesn't like downgrading packages unless you explicitly tell him to.

python36-devel requires python36-libs with the exact same version number. You have however python36-libs installed with a higher version number. You have two options:

  1. find out why yum can only find an older version of python36-devel, logically you should be able to find python36-devel-3.6.8-10 in the same repository where you installed python36-libs from (@rhui-REGION-rhel-server-releases).
  2. downgrade python36-libs to the same version as the python36-devel you are trying to install.

To downgrade and install python36-devel:

yum downgrade python36-libs-3.6.8-1.el7.x86_64
yum install python36-devel

or even in one single operation might work:

yum swap -- downgrade python36-libs-3.6.8-1.el7.x86_64 -- install python36-devel