1.下载Pyhon,选择下载Gzipped source tar ball (2.7.6) (sig)wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tar.xz --no-check-certificate2.解压安装,命令如下xz -d Python-2.7.13.tar.xztar xvf Python-2.7.13.tarcd Python-2.7.6./configure --prefix=/usr/local/python2.7makemake install3.创建链接来使系统默认python变为python2.7ln -fs /usr/local/python2.7/bin/python2.7 /usr/bin/python4.查看Python版本python �CV5.修改yum配置(否则yum无法正常运行)vi /usr/bin/yum将第一行的#!/usr/bin/python修改为系统原有的python版本地址#!/usr/bin/python2.6至此CentOS6.3系统Python已成功升级至2.7.6版本
原文链接:https://www.f2er.com/centos/376339.html