欢迎访问www.showerlee.com, 您的支持就是我前进的动力.

CentOS6.3下修复yum安装工具

showerlee 2013-12-11 11:49 其他 阅读 (29,436) 2条评论

一.删除自带的yum

# rpm -aq|grep yum|xargs rpm -e --nodeps  

二.从CentOS系统镜像中提取rpm包,这里以centos6.3_x64为例

这里从镜像包Packages目录下提取如下rpm包:

1

三.安装rpm包

注:这里我为了方便就将所有提取出来的包放到我的VPS上供大家下载

# wget http://www.showerlee.com/down/python-iniparse-0.3.1-2.1.el6.noarch.rpm

# rpm -ivh python-iniparse-0.3.1-2.1.el6.noarch.rpm

# wget http://www.showerlee.com/down/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

# rpm -ivh yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

# wget http://www.showerlee.com/down/yum-3.2.29-30.el6.centos.noarch.rpm

# wget http://www.showerlee.com/down/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

# rpm -ivh yum-3.2.29-30.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

注:这一步要两个一起安装,要不会会出现如下错误:

----------------------------------------------

# rpm -ivh yum-3.2.29-30.el6.centos.noarch.rpm

warning: yum-3.2.29-30.el6.centos.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897

error: Failed dependencies:

yum-fastestmirror is needed by yum-3.2.29-30.el6.centos.noarch

# rpm -ivh yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm

warning: yum-plugin-fastestmirror-1.1.30-14.el6.noarch.rpm: Header V3 DSA signature: NOKEY, key ID e8562897

error: Failed dependencies:

yum >= 3.0 is needed by yum-plugin-fastestmirror-1.1.30-14.el6.noarch

-----------------------------------------------

# wget http://www.showerlee.com/down/PackageKit-yum-0.5.8-20.el6.x86_64.rpm

# rpm -ivh PackageKit-yum-0.5.8-20.el6.x86_64.rpm

# wget http://www.showerlee.com/down/PackageKit-yum-plugin-0.5.8-20.el6.x86_64.rpm

# rpm -ivh PackageKit-yum-plugin-0.5.8-20.el6.x86_64.rpm

四.下载配置源:

# cd /etc/yum.repos.d/

# wget http://docs.linuxtone.org/soft/lemp/CentOS-Base.repo

五.测试

# yum version

---------------------------------------------

Loaded plugins: fastestmirror, refresh-packagekit

Warning: RPMDB altered outside of yum.

Installed: 6/x86_64                1285:a2a18f0b8c3ca036a361579f6b22014aadfd680e

Group-Installed: yum                 14:45bb88c01e2346ba8fe7ac401a053cfd42bda739

version

----------------------------------------------

大功告成.....

正文部分到此结束
版权声明:除非注明,本文由(showerlee)原创,转载请保留文章出处!
本文链接:http://www.showerlee.com/archives/1026

继续浏览:

2条大神的评论

loading
  1. 沙发
    lionel2016年12月8日下午2:13 回复

    请问这个错误是什么情况:头V3 DSA/SHA1 Signature, 密钥 ID e8562897: NOKEY
    错误:依赖检测失败:

    • showerlee2016年12月12日下午1:40 回复

      建议google一下,这个文档我写的很久了,应该只是适配centos6.3版本。

发表评论

icon_wink.gif icon_neutral.gif icon_mad.gif icon_twisted.gif icon_smile.gif icon_eek.gif icon_sad.gif icon_rolleyes.gif icon_razz.gif icon_redface.gif icon_surprised.gif icon_mrgreen.gif icon_lol.gif icon_idea.gif icon_biggrin.gif icon_evil.gif icon_cry.gif icon_cool.gif icon_arrow.gif icon_confused.gif icon_question.gif icon_exclaim.gif