Apple iPhone 11 (A2223) 128GB 黑色 移动联通电信4G手机 双卡双待
4999元包邮
去购买 >
可能你会在工作中、学习等过程中遇到服务器因为某些原因,从而导致需要安装或者重新安装pyton和yum的情况.但是网上各路鬼神说法各异甚至根本就无法执行等问题.Ok,不要着急,清晰的解决方案来了.好吧,我们进入正题.
第一步:卸载和清理
rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps
whereis python |xargs rm -frv
rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps
whereis yum |xargs rm -frv
ok,到这里为止呢已经清理完成.接下来就是下载安装包(注意:务必根据自己服务器的版本来下载依赖和包)!
第二步:下载安装包
查看server版本(我这里是 Centos 7.6.1810 )
cat /etc/redhat-release
首先,进入http://mirrors.ustc.edu.cn/centos/查找相对应的版本
我自己的server版本对应的路径为.这里我要提一下.很多童鞋们会在这里踩坑.centos7.0到centos7.8之前版本所有软件包,现在镜像站都将通用centos7版路径下的包.
官方是这样描述的:
This directory (and version of CentOS) is deprecated. For normal users,
you should use /7/ and not /7.0.1406~7.7.1908/ in your path. Please see this FAQ
concerning the CentOS release scheme:
https://wiki.centos.org/FAQ/General
If you know what you are doing, and absolutely want to remain at the 7.0.1406~7.7.1908
level, go to http://vault.centos.org/ for packages.
Please keep in mind that 7.0.1406~7.7.1908 no longer gets any