Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
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. 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
show 3 more comments

3 Answers

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.

share|improve this answer
    
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
add comment

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

share|improve this answer
    
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
add comment

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

share|improve this answer
    
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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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