centos6.5 yum安裝
查看、卸載已安裝的yum包
查看已安裝的yum包
[[email protected] ~]# rpm -qa|grep yum yum-metadata-parser-1.1.2-16.el6.x86_64 yum-plugin-fastestmirror-1.1.30-17.el6_5.noarch yum-plugin-security-1.1.30-17.el6_5.noarch yum-3.2.29-43.el6.centos.noarch yum-utils-1.1.30-17.el6_5.noarch
卸載軟件包
[[email protected] ~]# rpm -qa|grep yum|xargs rpm -e
下載安裝yum包
下載地址
http://centos.ustc.edu.cn/centos/6.5/os/x86_64/Packages/
http://mirrors.163.com/centos/6/os/x86_64/Packages/
找到對應包如:
http://mirrors.163.com/centos/6/os/x86_64/Packages/
yum-3.2.29-73.el6.centos.noarch.rpm
yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
yum-plugin-fastestmirror-1.1.30-37.el6.noarch.rpm
安裝yum包:
[[email protected] ~]# rpm -ivh yum-* error: Failed dependencies: Python-urlgrabber >= 3.9.1-10 is needed by yum-3.2.29-73.el6.centos.noarch
發現錯誤,python-urlgrabber版本必須大於等於3.9.1-10
查看系統的python信息
[[email protected] ~]# rpm -qa|grep python python-libs-2.6.6-52.el6.x86_64 libproxy-python-0.3.0-4.el6_3.x86_64 newt-python-0.52.11-3.el6.x86_64 python-ethtool-0.6-5.el6.x86_64 python-urlgrabber-3.9.1-9.el6.noarch python-iniparse-0.3.1-2.1.el6.noarch abrt-addon-python-2.0.8-21.el6.centos.x86_64 python-setuptools-0.6.10-3.el6.noarch python-iwlib-0.1-1.2.el6.x86_64 python-pycurl-7.19.0-8.el6.x86_64 python-2.6.6-52.el6.x86_64 libxml2-python-2.7.6-14.el6_5.2.x86_64 dbus-python-0.83.0-6.1.el6.x86_64 libreport-python-2.0.9-19.el6.centos.x86_64 python-pip-7.1.0-1.el6.noarch rpm-python-4.8.0-37.el6.x86_64
發現python-urlgrabber-3.9.1-9.el6.noarch 版本低於3.9.1-10
卸載:python-urlgrabber-3.9.1-9.el6.noarch
rpm -e python-urlgrabber-3.9.1-9.el6.noarch
下載: wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpm
安裝:
rpm -ivh python-urlgrabber-3.9.1-11.el6.noarch.rpm
安裝yum
[[email protected] ~]# rpm -ivh yum-*
更改yum源
下載配置文件
http://mirrors.163.com/.help/CentOS6-Base-163.repo
將此配置文件替換/etc/yum.repos.d同名文件
編輯配置文件
#cd /etc/yum.repos.d
#vim CentOS-Base.repo
把$releasever替換成現有系統的版本號(6)
vim替換命令
:%s/$releasever/6/g
退出保存
清理yum緩存
#yum clean all
將服務器軟件包信息緩存至本地,提高搜索安裝效率
#yum makecache
測試
#yum seach vim
centos6.5 yum安裝