CentOS 5.3 X64 yum update时出现问题 与 解决办法

在yum update时出现如下错误

–> Processing Conflict: python-devel conflicts python < 2.4.3-24.el5_3.6
–> Finished Dependency Resolution
python-devel-2.4.3-24.el5_3.6.i386 from update has depsolving problems
–> python-devel conflicts with python
Error: python-devel conflicts with python

在网上查找各种方法:
大部分说是python-devel2.43与2.44同时安装的结果,可是我的不一样

[root@centos images]# yum list installed python python-devel
Loaded plugins: fastestmirror
Installed Packages
python.x86_64 2.4.3-24.el5 installed
python-devel.i386 2.4.3-24.el5 installed
python-devel.x86_64 2.4.3-24.el5 installed

看是python-devel.i386 与python-devel.x86_64同时安装了,一个是32位的一个是64位的,删除32位的,我系统是X64的

[root@centos images]# rpm -e python-devel.i386

删除后再来看看

[root@centos images]# yum list installed python python-devel
Loaded plugins: fastestmirror
Installed Packages
python.x86_64 2.4.3-24.el5 installed
python-devel.x86_64 2.4.3-24.el5 installed

现在看来是正常了,再升级看看

[root@centos images]# yum update
Transaction Summary
=====================================================
Install 9 Package(s)
Update 57 Package(s)
Remove 0 Package(s)

Total download size: 129 M
Is this ok [y/N]: n
Exiting on user Command
Complete!

一切正常了
——————————————————-
发现,如果更新源选择的不对也会出现此问题
比如X64的系统用i386的源
先把源的配置搞正确
/etc/yum.repos.d/CentOS-Base.repo

[base]
name=CentOS-5 – Base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever5&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
baseurl=http://ftp.sjtu.edu.cn/centos/5.3/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#released updates
[update]
name=CentOS-5 – Updates
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=updates
baseurl=http://ftp.sjtu.edu.cn/centos/5.3/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#packages used/produced in the build but not released
[addons]
name=CentOS-5 – Addons
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=addons

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#additional packages that may be useful
[extras]
name=CentOS-5 – Extras
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=extras

baseurl=http://ftp.sjtu.edu.cn/centos/5.3/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-5 – Plus
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=centosplus
baseurl=http://ftp.sjtu.edu.cn/centos/5.3/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

#contrib – packages by Centos Users
[contrib]
name=CentOS-5 – Contrib
#mirrorlist=http://mirrorlist.centos.org/?release=4&arch=$basearch&repo=contrib
baseurl=http://ftp.sjtu.edu.cn/centos/5.3/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-centos5

再清一下缓存
yum clean all
再升级一下,看看,应该没问题了吧
——————————————————-
如果出现
Metadata file does not match checksum
运行
yum clean all
就可以了

先这样了,哎,今天遇到的问题好多呀 [cry]

——————————————————-
当升级一半而强行中断后
再见升级可能会出现依赖问题,使用
package-cleanup –problems
把列出的包卸载,然后再升级,就好了

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注