-1

I'm trying to resolve one dependency. Because RHEL6 doesn't contain python-2.4.3, I downloaded the package from RHEL5 and put it into our own repository. Then upon installing it:

...
---> Package cppunit.x86_64 0:1.12.0-4.el5.1 will be installed                                                          
---> Package mx.x86_64 0:2.0.6-2.2.2 will be installed                                                                  
--> Processing Dependency: python(abi) = 2.4 for package: mx-2.0.6-2.2.2.x86_64                                         
---> Package python2.5-mysql.x86_64 0:1.2.2-5.el5 will be installed                                                     
--> Processing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) for package: python2.5-mysql-1.2.2-5.el5.x86_64                                                                                                                     
--> Processing Dependency: libmysqlclient_r.so.15()(64bit) for package: python2.5-mysql-1.2.2-5.el5.x86_64              
--> Finished Dependency Resolution                                                                                      
Error: Package: python2.5-mysql-1.2.2-5.el5.x86_64 (xxx)                                                        
           Requires: libmysqlclient_r.so.15()(64bit)                                                                    
Error: Package: python2.5-mysql-1.2.2-5.el5.x86_64 (xxx)                                                        
           Requires: libmysqlclient_r.so.15(libmysqlclient_15)(64bit)                                                   
Error: Package: mx-2.0.6-2.2.2.x86_64 (xxx)                                                                     
           Requires: python(abi) = 2.4                                                                                  
           Installed: python-2.6.6-29.el6_3.3.x86_64 (@main-updates)                                                    
               python(abi) = 2.6                                                                                        
           Installed: python27-2.7.3-1.el5.x86_64 (@xxx)                                                        
               python(abi) = 2.7                                                                                        
           Available: python-2.4.3-56.el5.x86_64 (xxx)                                                          
               python(abi) = 2.4                                                                                        
           Available: python-2.6.6-29.el6_2.2.x86_64 (main-base)                                                        
               python(abi) = 2.6                                                                                        
           Available: python27-2.7.2-5.2.el5.x86_64 (xxx)                                                       
               python(abi) = 2.7                                                                                        
 You could try using --skip-broken to work around the problem                                                           
 You could try running: rpm -Va --nofiles --nodigest                                                                    

So I try to install by hand.

[root@render3 dusan]# yum install python-2.4.3                                                                          
Loaded plugins: fastestmirror, product-id, security                                                                     
Loading mirror speeds from cached hostfile                                                                              
 * main-base: yum01ldn.peer1.com                                                                                        
 * main-extras: yum01ldn.peer1.com                                                                                      
 * main-optional: yum01ldn.peer1.com                                                                                    
 * main-updates: yum01ldn.peer1.com                                                                                     
Setting up Install Process                                                                                              
Package matching python-2.4.3-56.el5.x86_64 already installed. Checking for update.                                     
Nothing to do                                                                                                           

[root@render3 dusan]# yum erase python-2.4.3                                                                            
Loaded plugins: fastestmirror, product-id, security                                                                     
Setting up Remove Process                                                                                               
No Match for argument: python-2.4.3                                                                                     
Loading mirror speeds from cached hostfile                                                                              
 * main-base: yum01ldn.peer1.com                                                                                        
 * main-extras: yum01ldn.peer1.com                                                                                      
 * main-optional: yum01ldn.peer1.com                                                                                    
 * main-updates: yum01ldn.peer1.com                                                                                     
Package(s) python-2.4.3 available, but not installed.                                                                   
No Packages marked for removal                                                                                          
[root@render3 dusan]#                                                                                                   

How do I resolve this?

skrat
  • 505
  • 1
  • 7
  • 14
  • did you try `yum remove python-2.4.3-56.el5.x86_64` ? – Daniel t. Feb 13 '13 at 17:34
  • @Danielt. Package(s) python-2.4.3-56.el5.x86_64 available, but not installed – skrat Feb 13 '13 at 17:36
  • 1
    Please tell us what you're [actually trying to accomplish](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem). What package do you want to install and where are you currently getting it from? – mgorven Feb 13 '13 at 17:38
  • @mgorven those are our proprietary packages, I'm porting our software to RHEL6, we use RPM/yum for deployment. – skrat Feb 13 '13 at 17:41
  • 1
    @mgorven you misunderstood the question. The question is about contradictory messages printed by yum, ie. `Package matching ... already installed...` and `Package(s) python-2.4.3 available, but not installed ` – skrat Feb 13 '13 at 17:49
  • Voting is not an appropriate topic of discussion for comments - the comments above have been edited accordingly. If you wish to discuss upvotes, downvotes, closure, unicorns, or anything not directly related to the question please [take it to Meta Server Fault](http://meta.serverfault.com) – voretaq7 Feb 13 '13 at 17:55
  • Have you verified (using `rpm -q -a`) that the package you want to remove is named what you think it is? Along the same lines, have you tried removing the package directly using `rpm`? (the former may explain `yum`'s confusion, the latter may get you around the problem) – voretaq7 Feb 13 '13 at 17:58
  • Expanding on @voretaq7's suggestion, adding the output of the following command to your question will help us give you the right answer: `rpm -qa | grep -E '^python'` – Andrew B Feb 13 '13 at 19:35

3 Answers3

2

The solution is to rebuild your proprietary packages for RHEL 6 so that it uses the version of Python (and other dependencies) that comes with RHEL 6. Trying to force it to use an old Python version is not the right way.

mgorven
  • 30,615
  • 7
  • 79
  • 122
  • My question is about why yum says it can't install something that is installed, note the `install` and `erase` sequence with contradicting messages. – skrat Feb 13 '13 at 17:45
0

You can create your own RPMs from source., based on your current CentOS 6 setup.

The short answer on how to do that is
rpmbuild --rebuild /tmp/mypythonpackagename-2.3.4-56.src.rpm

For a lot of details see http://wiki.centos.org/HowTos/RebuildSRPM

Hennes
  • 4,842
  • 1
  • 19
  • 29
  • Why would I do this? I did the same thing (download from EL5, upload to our repo, use in EL6) with other packages (tk8.4, tcl8.4) and it worked. I just don't get why is yum telling that it's: available when installing something depending on python-2.4.3, installed when I try to install it, and not installed when I'm removing it. – skrat Feb 13 '13 at 17:35
0

You are trying to install an older python version replacing a newer one. As yum depends on python, that's not a good idea.

Install the older python version side-by-side by using a repository like this one

fuero
  • 9,591
  • 1
  • 35
  • 40
  • This is normally handled by alternatives system, see `man alternatives`. You can have many python versions installed side by side, from RHEL repositories. – skrat Feb 13 '13 at 17:47