概述
由于服务器Centos6系统版本过低导致网络上不存在历史rpm版本的安装包,通过卸载并安装最新版python2.6后导致yum仍然无法继续使用。
[root@localhost ~]# yum list wget
已加载插件:fastestmirror, product-id, subscription-manager
Updating Red Hat repositories.
Loading mirror speeds from cached hostfile
Traceback (most recent call last):
........
ImportError: No module named cElementTree
解决办法
通过查询相关文档发现缺少libexpat.so.1
库依赖,但是版本包还存在,需要升级。
[root@localhost ~]# rpm -q expat
expat-2.0.1-9.1.el6.x86_64
[root@localhost ~]# rpm -Uvh http://s3-cn-bj.ufileos.com/filecloud/Mirrors/Centos/6/Packages/expat-2.0.1-13.el6_8.x86_64.rpm
Retrieving http://s3-cn-bj.ufileos.com/filecloud/Mirrors/Centos/6/Packages/expat-2.0.1-13.el6_8.x86_64.rpm
Preparing... ########################################### [100%]
1:expat ########################################### [100%]
[root@localhost ~]# rpm -q expat
expat-2.0.1-13.el6_8.x86_64
文章来源于互联网:Centos6 Yum升级python2.6后 No module named cElementTree处理