概述

由于服务器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
END

本文标题:Centos6 Yum升级python2.6后 No module named cElementTree处理

本文作者:宇宙最帅的男人

本文链接:https://lolicp.com/linux/202112324.html

版权声明:转载或者引用本文内容请注明来源及原作者,本文著作权归作者 (宇宙最帅的男人) 所有。

除非另有说明,本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议

最后修改:2021 年 11 月 12 日
如果觉得我的文章对你有用,请随意赞赏