Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
358 views
in Technique[技术] by (71.8m points)

误删centos系统中的python2,导致yum无法使用,如何解决?

image.png
原系统中自带python2,我为了装python3,把系统中的python2删掉了,结果造成yum没法使用了。
之后我为了解决这个问题,将python3暂时删掉了,装了python2.6,并设成软连接,然而仍然无法解决。
又尝试装了python2.7仍然不行。
这个问题该如何解决?
我使用的是centos7,印象里其自带的python版本是2.6,但装上了不行。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
http://vault.centos.org/

去官网找到对应的你的centos版本,下载你需要的python rpm包 把你以前安装python先卸载了,或者软连接下,然后下载下来rpm 安装下就可以了,如果时centos7的,firewalld也是依赖python安装测是下功能。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...