标签:python 2.7.9
CentOS 7.1 自带 python 2.7.5, 存在sslv3验证的问题,需要通过升级来解决
///
/// 新系统自带的 Python
///
[root@wode005 tools]# python -V
Python 2.7.5
[root@wode005 tools]# which python
/usr/bin/python
[root@wode005 tools]#
///
/// 利用 yum 升级 python
///
[root@wode005 ~]# yum update python
已加载插件:fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
base | 3.6 kB 00:00
extras | 3.4 kB 00:00
updates | 3.4 kB 00:00
(1/4): base/7/x86_64/group_gz | 155 kB 00:00
(2/4): extras/7/x86_64/primary_db | 90 kB 00:00
(3/4): updates/7/x86_64/primary_db | 935 kB 00:03
(4/4): base/7/x86_64/primary_db | 5.3 MB 00:06
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 python.x86_64.0.2.7.5-18.el7_1.1 将被 升级
---> 软件包 python.x86_64.0.2.7.5-34.el7 将被 更新
--> 正在处理依赖关系 python-libs(x86-64) = 2.7.5-34.el7,它被软件包 python-2.7.5-34.el7.x86_64 需要
--> 正在检查事务
---> 软件包 python-libs.x86_64.0.2.7.5-18.el7_1.1 将被 升级
---> 软件包 python-libs.x86_64.0.2.7.5-34.el7 将被 更新
--> 解决依赖关系完成
依赖关系解决
================================================================================
Package 架构 版本 源 大小
================================================================================
正在更新:
python x86_64 2.7.5-34.el7 base 88 k
为依赖而更新:
python-libs x86_64 2.7.5-34.el7 base 5.6 M
事务概要
================================================================================
升级 1 软件包 (+1 依赖软件包)
总下载量:5.7 M
Is this ok [y/d/N]: y
Downloading packages:
No Presto metadata available for base
(1/2): python-2.7.5-34.el7.x86_64.rpm | 88 kB 00:00
(2/2): python-libs-2.7.5-34.el7.x86_64.rpm | 5.6 MB 00:09
--------------------------------------------------------------------------------
总计 587 kB/s | 5.7 MB 00:09
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在更新 : python-libs-2.7.5-34.el7.x86_64 1/4
正在更新 : python-2.7.5-34.el7.x86_64 2/4
清理 : python-2.7.5-18.el7_1.1.x86_64 3/4
清理 : python-libs-2.7.5-18.el7_1.1.x86_64 4/4
验证中 : python-libs-2.7.5-34.el7.x86_64 1/4
验证中 : python-2.7.5-34.el7.x86_64 2/4
验证中 : python-2.7.5-18.el7_1.1.x86_64 3/4
验证中 : python-libs-2.7.5-18.el7_1.1.x86_64 4/4
更新完毕:
python.x86_64 0:2.7.5-34.el7
作为依赖被升级:
python-libs.x86_64 0:2.7.5-34.el7
完毕!
[root@wode005 ~]#
[root@wode005 tools]# python -V
Python 2.7.5
[root@wode005 tools]# which python
/usr/bin/python
[root@wode005 tools]#
yum update python 升级之后,还是 2.7.5
[root@wode005 bin]# ls -alh python*
lrwxrwxrwx. 1 root root 7 12月 15 20:19 python -> python2
lrwxrwxrwx. 1 root root 9 12月 15 20:19 python2 -> python2.7
-rwxr-xr-x. 1 root root 7.0K 11月 20 10:01 python2.7
[root@wode005 bin]# ./python2 -V
Python 2.7.5
[root@wode005 bin]# ./python -V
Python 2.7.5
[root@wode005 bin]#
///
/// 下载源码包
///
# wget --no-check-certificate https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tar.xz
# yum install gcc
# yum install gcc-c++
yum install zlib-devel yum install bzip2-devel yum install openssl-devel yum install ncurses-devel yum install sqlite-devel
# ./configure
# make
# make install
# make clean
[root@wode004 tools]# python -V
Python 2.7.9
[root@wode004 tools]# which python
/usr/local/bin/python
[root@wode004 tools]#
标签:python 2.7.9
原文地址:http://huangchao.blog.51cto.com/10446378/1723366