yum问题解决



错误信息1:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

No module named urlgrabber

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, Nov 22 2013, 12:16:22)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]

If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq

解决办法:

进入这个网址:http://urlgrabber.baseurl.org/download/

通过wget命令下载 wget http://urlgrabber.baseurl.org/download/urlgrabber-3.10.tar.gz

解压并进入该目录下执行该命令:python setup.py install

错误信息2:

Loaded plugins: fastestmirror
Error: File contains no section headers.
file: file://///etc/yum.repos.d/CentOS-Debuginfo.repo, line: 1
'eme=CentOS-6 - Debuginfo '

执行如下命令即可解决:

cd /etc/yum

cd yum.repos.d

mv CentOS-Debuginfo.repo CentOS-Debuginfo.repo.bak


原文地址:https://www.cnblogs.com/youcong/p/7868242.html