如何在centos上安装yum

时间:2015-07-01 10:45:52

标签: linux centos

我误删了/usr/bin/yum

如何在centos6上重新安装yum 请帮帮我;(

我按照网站说明 但是我收到了这个错误Failed dependencies: blah,blahyum-2.2.1-1.centos4.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID ###: NOKEY

PS。我试试这个

wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm

rpm -ivH yum-3.2.29-60.el6.centos.noarch.rpm

然后我收到了这个错误

 Failed dependencies:
    /usr/bin/python is needed by yum-3.2.29-60.el6.centos.noarch
    python >= 2.4 is needed by yum-3.2.29-60.el6.centos.noarch
    python(abi) = 2.6 is needed by yum-3.2.29-60.el6.centos.noarch
    python-sqlite is needed by yum-3.2.29-60.el6.centos.noarch

所以我复制旧版本的yum 我得到的这个错误

-bash: /usr/bin/yum: /usr/bin/python2.6: bad interpreter: no such file or directory

(我将python2.6升级到python2.7)

1 个答案:

答案 0 :(得分:0)

机器上是否有aptitude或apt-get可用?

apt-get install yum

或者看看这里: http://openvz.org/Install_yum