Centos7重新安裝yum
- rpm -qa|grep yum
- 然后用下面的命令刪除出現的xxx包:
- rpm -e --nodeps xxx
下載
- python-urlgrabber-3.10-8.el7.noarch.rpm
- python-iniparse-0.4-9.el7.noarch.rpm
- yum-plugin-fastestmirror-1.1.31-40.el7.noarch.rpm
- yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
- yum-3.4.3-150.el7.centos.noarch.rpm
地址:http://mirrors.163.com/centos/7/os/x86_64/Packages/
安裝
rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm
rpm -ivh python-urlgrabber-3.10-8.el7.noarch.rpm
rpm -ivh yum-.rpm yum-metadata-parser-.rpm yum-plugin-fastestmirror-*.rpm
修改來源文件
`
cd /etc/yum.repos.d
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
`
根據centos版本,修改:vi CentOS6-Base-163.repo,$releasever替換成7 改名成默認repo:mv CentOS7-Base-163.repo CentOS7-Base.repo
- yum makecache
- yum clean all
- yum update
如果執行上面的命令,出現如下錯誤,可能就是yum源沒有掛載上 Couldn't open file /mnt/repodata/repomd.xml 執行命令掛載yum源:mount -o loop /dev/sr0 /mnt
yum卸載安裝
http://blog.csdn.net/delphi1234/article/details/51546798
