标签:rpm centos6 problem 查看 this 错误 ada error nload
1. 使用yum安装软件时,报如下错误:[root@node1 ~]# yum install lrzsz
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named rpm
Please install a package which provides this module, or
verify that the module is installed correctly.
It‘s possible that the above module doesn‘t match the
current version of Python, which is:
2.6.6 (r266:84292, Jul 23 2015, 15:22:56)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
[root@node1 ~]#
[root@node1 ~]# head -1 /usr/bin/yum
#!/usr/bin/python2.6
[root@node1 ~]# ll /usr/bin/python2.6
-rwxr-xr-x 1 root root 4864 7月 24 2015 /usr/bin/python2.6
[root@node1 ~]# /usr/bin/python2.6 --version
Python 2.6.6
[root@node1 ~]#
修改yum指向到python2.6.6
[root@node1 ~]# vim /usr/bin/yum
# 测试
[root@node1 ~]# yum install lrzsz
则说明centos6.*的python2.6.6损坏,通过rpm重装python2.6.6,须到官网下载指定版本的包:
官网:http://vault.centos.org/6.8/os/x86_64/Packages/
需下载的包:
python
python-iniparse
python-pycurl
python-urlgrabber
python-devel
python-libs
python-setuptools
rpm-python
安装下载的rpm包:
[root@node1 ~]# rpm -ivh *rpm
# 测试yum是否可用
[root@node1 ~]# yum install lrzsz
# 需下载的包:
yum
yum-metadata-parser
yum-utils
yum-plugin-fastestmirror
yum-plugin-protectbase
yum-plugin-aliases
yum-plugin-downloadonly
# 安装
rpm -ivh yum*
# 测试
[root@node1 ~]# yum install lrzsz
CentOS 6.* 运行yum报错:No module named rpm
标签:rpm centos6 problem 查看 this 错误 ada error nload
原文地址:http://blog.51cto.com/moerjinrong/2173963