百胜无法在centos 7中安装任何东西

时间:2019-06-27 06:21:42

标签: centos7 yum

当我尝试安装某些东西甚至更新yum时,它显示出如下错误:-

/bin/yum: line 2: import: command not found

/bin/yum: line 3: try:: command not found

/bin/yum: line 4: import: command not found

/bin/yum: line 5: except: command not found

/bin/yum: line 23: syntax error near unexpected token `('

/bin/yum: line 23: `""" % (sys.exc_value, sys.version)'

即使我尝试重新安装yum,但是当我删除yum仓库时,它也会给我带来依赖错误:-

[root@skynet rohit]# rpm -qa | grep yum

yum-3.4.3-161.el7.centos.noarch

yum-plugin-fastestmirror-1.1.31-50.el7.noarch

yum-metadata-parser-1.1.4-10.el7.x86_64

[root@skynet rohit]# rpm -e yum-3.4.3-161.el7.centos.noarch.rpm
error: package yum-3.4.3-161.el7.centos.noarch.rpm is not installed

[root@skynet rohit]# rpm -e yum-3.4.3-161.el7.centos.noarch
error: Failed dependencies:
        yum >= 3.0 is needed by (installed) yum-plugin-fastestmirror-1.1.31-50.el7.noarch

[root@skynet rohit]# rpm -e yum-plugin-fastestmirror-1.1.31-50.el7.noarch
error: Failed dependencies:
        yum-plugin-fastestmirror is needed by (installed) yum-3.4.3-161.el7.centos.noarch

[root@skynet rohit]# rpm -e yum-metadata-parser-1.1.4-10.el7.x86_64
error: Failed dependencies:
        yum-metadata-parser >= 1.1.0 is needed by (installed) yum-3.4.3-161.el7.centos.noarch

1 个答案:

答案 0 :(得分:0)

您可能是python的问题,也许删除了yum使用的python2.7?