CentOS升级Python 2.6到2.7
2016-10-11 18:01
267 查看
查看python的版本
python -V
Python 2.6.6下载Python Python-2.7.8.tar.xz 链接:http://pan.baidu.com/s/1i4cCIR7 密码:j570https://yunpan.cn/cB3ddbtUE8yeu 访问密码 0e70https://www.python.org/ftp/python/2.7.8/Python-2.7.8.tgz
yum -y install gcc automake autoconf libtool make
yum install zlib-devel
yum install -y openssl*
yum install -y bzip2*安装
tar -xvf Python-2.7.8.tar.xz
./configure
make all
make install
make clean
make distclean查看版本信息
/usr/local/bin/python2.7 -V
Python 2.7.8建立软连接,使系统默认的 python指向 python2.7
mv /usr/bin/python /usr/bin/python2.6.6
ln -s /usr/local/bin/python2.7 /usr/bin/python重新检验Python 版本
python -V
Python 2.7.8解决Python软链接指向 Python2.7 版本后,yum不能正常工作的问题。因为yum是不兼容 Python 2.7的,所以需要指定 yum 的Python版本
vim /usr/bin/yum将文件头部的
#!/usr/bin/python改成
#!/usr/bin/python2.6.6
艺搜参考
https://www.python.org/ftp/python/2.7.8/https://www.python.org/download/releases/2.7.8/相关文章推荐
- centos x86 64bit 升级python2.6到2.7
- Centos 6.4 python 2.6 升级到 2.7
- Centos 6.4 python 2.6 升级到 2.7一起的MySQLdb不能使用的解决问题
- Centos 6.4 python 2.6 升级到 2.7
- Centos 6.4 python 2.6 升级到 2.7
- Centos 升级Python到2.6或2.7版本
- Centos 6.4 python 2.6 升级到 2.7
- Centos 6.4 python 2.6 升级到 2.7
- Centos 6.4 python 2.6 升级到 2.7
- Centos 6.4 python 2.6 升级到 2.7
- Centos 6.4 python 2.6 升级到 2.7
- Centos 6.4 python 2.6 升级到 2.7
- Centos 6.4 python 2.6 升级到 2.7
- centos6.5 x86_64 python2.6升级2.7
- centos默认python2.6升级2.7
- CentOS python版本的升级 从2.6 到2.7
- 2015-05-19-Centos-6-python-2.6-升级到-2.7
- Centos 6.4 python 2.6 升级到 2.7
- Centos 6.4 python 2.6 升级到 2.7
- Centos 6.4 python 2.6 升级到 2.7