yum問題解決

youcongtech發表於2017-11-20

錯誤資訊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


相關文章