centos6.5 yum安装

前端之家收集整理的这篇文章主要介绍了centos6.5 yum安装前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

查看、卸载已安装的yum包

查看已安装的yum包

[root@iZ23rter8cjZ ~]# 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

卸载软件包

[root@iZ23rter8cjZ ~]# 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包:

[root@iZ23rter8cjZ ~]# 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信息

[root@iZ23rter8cjZ ~]# 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

[root@iZ23rter8cjZ ~]# 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

原文链接:/centos/381799.html

猜你在找的CentOS相关文章