RPM安装但RHEL6安装不了

RPM安装但RHEL6安装不了

我正在尝试解决一个依赖关系。由于 RHEL6 不包含 python-2.4.3,因此我从 RHEL5 下载了该软件包并将其放入我们自己的存储库中。然后在安装它时:

...
---> 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                                                                    

因此我尝试手动安装。

[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]#                                                                                                   

我该如何解决这个问题?

答案1

解决方案是重建 RHEL 6 的专有软件包,以便它使用 RHEL 6 附带的 Python 版本(和其他依赖项)。尝试强制它使用旧的 Python 版本并不是正确的方法。

答案2

您可以根据当前的 CentOS 6 设置从源代码创建自己的 RPM。

如何做到这一点的简短答案是
rpmbuild --rebuild /tmp/mypythonpackagename-2.3.4-56.src.rpm

详细信息请参阅http://wiki.centos.org/HowTos/RebuildSRPM

答案3

您正在尝试安装较旧的 Python 版本来替换较新的版本。由于 yum 依赖于 Python,因此这不是一个好主意。

使用类似以下存储库同时安装旧版 Python 版本这个

相关内容