yum错误'module' object has no attribute 'iterparse'解决方法
来源:互联网 发布:js 点击按钮执行函数 编辑:程序博客网 时间:2024/06/05 04:00
运行yum时出现下面的错误:
root@server [~]# yum
Traceback (most recent call last):
File "/usr/bin/yum", line 4, in ?
import yum
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 49, in ?
import comps
File "/usr/lib/python2.4/site-packages/yum/comps.py", line 23, in ?
iterparse = cElementTree.iterparse
AttributeError: 'module' object has no attribute 'iterparse'
这个问题提到了cElementTree,搜了一下发现位于Python的cElementTree模块,重新安装这个模块(直接卸载会有yum依赖关系):
rpm -ivh --force http://mirrors.sohu.com/centos/5.6/os/x86_64/CentOS/python-elementtree-1.2.6-5.x86_64.rpm我的系统是CentOS 5.6,系统架构是x86_64,其余系统、架构参照修改,也可以下载对应的rpm包安装,注意--force选项。
安装完之后,再运行yum,原来的错误已经消失,可能还会出现其他模块找不到的错误,一一按照提示安装,譬如,我还出现urlgrabber、iniparse找不到的错误:
rpm -ivh --force http://mirrors.sohu.com/centos/5.6/os/x86_64/CentOS/python-urlgrabber-3.1.0-6.el5.noarch.rpm rpm -ivh --force http://mirrors.sohu.com/centos/5.6/os/x86_64/CentOS/python-iniparse-0.2.3-4.el5.noarch.rpm
- yum错误'module' object has no attribute 'iterparse'解决方法
- Ubuntu运行scrapy报“scrapy: 'module' object has no attribute 'OP_SINGLE_ECDH_USE'错误解决方法”
- AttributeError: 'module' object has no attribute 的解决方法
- AttributeError: 'module' object has no attribute 'Frame' 解决方法
- AttributeError: 'module' object has no attribute 的解决方法
- AttributeError: 'module' object has no attribute 的解决方法
- AttributeError: 'module' object has no attribute 'Frame' 解决方法
- AttributeError: 'module' object has no attribute 的解决方法
- Python基础学习-'module' object has no attribute 'urlopen'解决方法
- 解决方法——AttributeError: 'module' object has no attribute 'VideoWriter_fourcc'
- Scrapy AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1 解决方法
- [python错误]builtins.AttributeError: 'module' object has no attribute 'request'
- python 错误解析 AttributeError: 'module' object has no attribute 'dumps'
- 出现错误如下:AttributeError: 'module' object has no attribute 'SSL_ST_INIT'
- Python 错误:AttributeError: 'module' object has no attribute
- Python错误AttributeError: 'module' object has no attribute 'copy'
- AttributeError: 'module' object has no attribute 'getpass'
- 'module' object has no attribute 'basicConfig'
- POJ 2377 Bad Cowtractors(Kruskal算法)
- 正则表达式 大积累
- 介绍6个HTML 5编辑器,
- silverlight的生命还在继续
- 如何给linux添加新硬盘
- yum错误'module' object has no attribute 'iterparse'解决方法
- 三大框架(ssh)的技术起源
- JTable 的用法小结
- HDU 题目不完全 分类!
- 专利申请已经开始公示
- 字符串原地压缩
- NSArray、NSMutableArray排序
- VC中的TabControl容器添加属性页
- Java 局域网流量统计