分类: LINUX
2012-08-27 17:29:13
症状
[root@localhost houge]# 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 55, in ?
import transactioninfo
File "/usr/lib/python2.4/site-packages/yum/transactioninfo.py", line 31, in ?
from sqlitesack import YumAvailablePackageSqlite
File "/usr/lib/python2.4/site-packages/yum/sqlitesack.py", line 26, in ?
import yumRepo
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 787
remote = url + '/' + relative
^
IndentationError: unindent does not match any outer indentation level
输入yum 就爆这错
网上的办法 什么重建啊 修复啊 都没用
解决办法
#卸载yum:
rpm -qa|grep yum|xargs rpm -e --nodeps
安装centos的yum
wget
wget
rpm -ivh *.rpm
下载更新源:
wget
mv CentOS_Base.repo /etc/yum.repos.d/CentOS-Base.repo
生成缓存并安装:
#yum makecache