8

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
Aks
  • 515
  • 1
  • 5
  • 9
  • I'm running into the same. – San Aug 14 '19 at 20:12
  • a quick glance looks like its a package conflict between `@rhui-REGION-rhel-server-releases` and `epel` repos. try disabling the `@rhui-REGION-rhel-server-releases` one and see if that fixes it. – user3788685 Aug 14 '19 at 20:14
  • @user3788685 When it says, `python3-3.6.8-10.el7.x86_64 which is already installed`, does it mean we already have development tools in the system? – San Aug 14 '19 at 20:21
  • yes - do `rpm -q python3` and it should return the same thing - that means you have that version installed. but thats just the base version of python - not the devel headers. – user3788685 Aug 14 '19 at 20:26
  • I get offered `python36` and `python36-devel` when I ask yum both from the epel repo. alas I can't install on the machine im checking. – user3788685 Aug 14 '19 at 20:30
  • @user3788685 disabling helped – Aks Aug 16 '19 at 10:47
  • @Aks no problem - do you want me to write you up an answer? – user3788685 Aug 16 '19 at 18:16
  • `yum install python36-devel` fails on a fresh oracle-linux VM with no existing python installed on the system. Seems to me the yum config got screwed up in the last week with different packages requiring either python3-libs or python36-libs – krock Aug 20 '19 at 04:01

3 Answers3

3

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
Chris Maes
  • 35,025
  • 12
  • 111
  • 136
2

As of Aug 23rd, 2019, I found the following workaround to deal with python36-3.6.8-1 in ol7_developer_EPEL repo lagging behind python36-3.6.8-10 in ol7_latest.

yum install -y gcc openssl redhat-rpm-config
&& yum-config-manager --disable ol7_latest
&& yum install -y python36 python36-devel python36-setuptools
&& pip3 install -r requirements.txt
&& python3 setup.py install
Hang
  • 956
  • 6
  • 12
0

Apparently the repo @rhui-REGION-rhel-server-releases have python3-libs-3.6.8-10.el7.x86_64 but not the lower version of python36-libs-3.6.8-1.el7.x86_64.

As pointed by Chris Maes, python36-devel and python36-libs should be of the exact same version.

epel repo had both the libraries of the same version, but due to conflict with @rhui-REGION-rhel-server-releases the installation was getting upgraded.

Hence, disable the repo @rhui-REGION-rhel-server-releases and use epel for both of the libraries

sudo yum-config-manager --disable rhui-REGION-rhel-server-releases
sudo yum-config-manager --disable @rhui-REGION-rhel-server-releases
sudo yum install python36-setuptools -y 
sudo yum install python36-devel -y 
# enable later
sudo yum-config-manager --enable rhui-REGION-rhel-server-releases
sudo yum-config-manager --enable @rhui-REGION-rhel-server-releases

Solution credit: user3788685

garg10may
  • 5,794
  • 11
  • 50
  • 91
Aks
  • 515
  • 1
  • 5
  • 9