contos7 yum程序運(yùn)行時(shí)報(bào)ImportError: No module named sqlitecachec
在163鏡像下載如下包 http://mirrors.163.com/centos/7/os/x86_64/Packages/
1:yum-metadata-parser-1.1.4-10.el7
2:yum-plugin-fastestmirror-1.1.31-5
3:yum-3.4.3-161.el7.centos
4:yum-utils-1.1.31-50.el7
rpm -ivh yum*.rpm 報(bào)幾個(gè)依賴要裝恐疲,分別將所有依賴下載
yum-utils-1.1.31-50.el7.noarch.rpm
yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm
yum-3.4.3-161.el7.centos.noarch.rpm
python-urlgrabber-3.10-9.el7.noarch.rpm
rpm-4.11.3-35.el7.x86_64.rpm
xz-libs-5.2.2-1.el7.x86_64.rpm
xz-devel-5.2.2-1.el7.x86_64.rpm
libxml2-python-2.9.1-6.el7_2.3.x86_64.rpm
libxml2-devel-2.9.1-6.el7_2.3.x86_64.rpm
libxml2-2.9.1-6.el7_2.3.x86_64.rpm
python-chardet-2.2.1-1.el7_1.noarch.rpm
yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
python-kitchen-1.1.1-5.el7.noarch.rpm
再依次安裝rpm -ivh xz.rpm 提示文件沖突 file XXX rpm conflicts with file from package XXX
加強(qiáng)制替換參數(shù) rpm -ivh --replacefiles xz.rpm
再依次安裝
rpm -ivh --replacefiles lib.rpm
rpm -ivh --replacefiles python.rpm
rpm -ivh --replacefiles rpm-4.11.3.35.e17.centos.noarch.rpm
rpm -ivh --replacefiles yum*.rpm
運(yùn)行yum list 報(bào)錯(cuò)
No module nameed yum
將 vim /usr/bin/yum 中的 #!/usr/bin/python 改為 #!/usr/bin/python2.7
再次運(yùn)行yum install XX 報(bào)錯(cuò)ImportError:No module nameed urlgrabber.grabber
只要把/usr/libexec/urlgrabber-ext-down 這個(gè)文件也按上面一樣改為python2.7
正常安裝軟件