3

When installing python-devel with

yum  install python-devel.x86_64

I got this error:

Resolving Dependencies
--> Running transaction check
---> Package python-devel.x86_64 0:2.6.6-36.el6 will be installed
--> Processing Dependency: python(x86-64) = 2.6.6-36.el6 for package: python-devel-2.6.6-36.el6.x86_64
--> Finished Dependency Resolution
Error: Package: python-devel-2.6.6-36.el6.x86_64 (tmp1)
           Requires: python(x86-64) = 2.6.6-36.el6
           Installed: python-2.6.6-52.el6.x86_64 (@rhel-x86_64-server-6)
               python(x86-64) = 2.6.6-52.el6
           Available: python-2.6.6-36.el6.x86_64 (tmp1)
               python(x86-64) = 2.6.6-36.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Has anybody an idea how to get python-devel installed?

Jawa
  • 2,336
  • 6
  • 34
  • 39
maher.belkh
  • 473
  • 2
  • 7
  • 21

3 Answers3

0

You are trying to install (from Yum) an older version python-2.6.6-36.el6.x86_64 than it is detecting on your system python-2.6.6-52.el6.x86_64 perhaps you installed it somehow other than through yum, perhaps from source or RPM.

You could try removing the newer version with rpm -e python-2.6.6-52.el6.x86_64 but why would you want to downgrade?

robert
  • 4,612
  • 2
  • 29
  • 39
  • Actually, it’s when trying to install MapR Hadoop i got this error. So, i thought that if i succeed to downgrade python-devel to 2.6.6.-36 i can fix the error. I tried to remove the newer version as you said but i got failed dependencies error. – maher.belkh Sep 10 '15 at 09:50
  • 1
    If you don't want to uninstall the existing python you can also try an "altinstall" http://stackoverflow.com/questions/4149361/on-linux-suse-or-redhat-how-do-i-load-python-2-7 – robert Sep 10 '15 at 10:18
  • 1
    You need to be very careful on Red Hat flavour linuxes, because Python is used by system bootstrap and upgrade code. Yum and anaconda are both written in Python. So if you want smooth system upgrades in future, it's a bad idea to install python system wide from anything other than the official repository for the OS. Apart from altinstall, there are ways to install a different python into a virtual environment. – nigel222 Sep 10 '15 at 12:13
0

Another way to add new versions of Python 2.7, 3.3, or 3.4 to RHEL (6 or 7) is to utilize Software Collections (aka RHSCL or SCL) which install along side the original Python versions. (There are many other languages, databases, web servers, and other tools, too.) RHSCLs are included in most RHEL subscriptions.

To get started: http://developers.redhat.com/products/softwarecollections/overview/

You can also find information here: https://access.redhat.com/products/Red_Hat_Enterprise_Linux/Developer/#rhscl=&dev-page=5

OR here: http://developerblog.redhat.com/tag/software-collections/

Mike Guerette
  • 533
  • 3
  • 6
0

This is not recommended, but I was having an issue installing pip packages. I ran yum install python-devel --nodeps. That command prevents dependencies from being installed, but it fixed my issue.

joshlsullivan
  • 1,375
  • 2
  • 14
  • 21