- 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
pre,code,tt { font-size: 12px; font-family: Consolas, "Liberation Mono", Courier, monospace }
code,tt { margin: 0 0px; padding: 0px 0px; white-space: nowrap; border: 1px solid #eaeaea; background-color: #f8f8f8 }
pre>code { margin: 0; padding: 0; white-space: pre; border: none; background: transparent }
pre { background-color: #f8f8f8; border: 1px solid #ccc; font-size: 13px; line-height: 19px; overflow: auto; padding: 6px 10px }
pre code,pre tt { background-color: transparent; border: none }
kbd { background-color: #DDDDDD; background-image: linear-gradient(#F1F1F1, #DDDDDD); background-repeat: repeat-x; border-color: #DDDDDD #CCCCCC #CCCCCC #DDDDDD; border-style: solid; border-width: 1px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; line-height: 10px; padding: 1px 4px }