Centos7重新安装yum
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