惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

噜啦 - 教程盒子

使用Python 在WordPress 自动发布文章 xmlrpc 404 Not Found 错误 cPanel面板 AirPods 小米8 安卓设备 音量小 终极解决方法 EHEH 免费,轻量的Linux服务器监控 SSL证书过期监控 - 噜啦 Privacy Pass Cloudflare验证码通过神器 - 噜啦 easypanel 搭建typecho 开启全站https/ssl 伪静态 - 噜啦 Kangle 安装教程 一键安装 小白教程 - 噜啦 EasyPanel 主题美化 - 噜啦 CentOS 6 安装 htop nload sublime 修改新标签页默认语法 - 噜啦
Centos6 安装Python2.7.6 - 噜啦
博主: 噜啦 · 2019-07-23 · via 噜啦 - 教程盒子

由于有经常需要在CentOS 6.X 上边安装Python 2.7.6的需求,这里写一下安装过程

查看原Python版本

[root@host ~]# python -V
Python 2.6.6

安装升级相应的软件包

yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make

下载python 2.7 的源码包

wget http://mirrors.sohu.com/python/2.7.6/Python-2.7.6.tgz

解压

tar zxf Python-2.7.6.tgz -C /usr/local/src/

安装

cd /usr/local/src/Python-2.7.6/
./configure --prefix=/usr/local/python2.7
make && make install

配置python

mv /usr/bin/python /usr/bin/python.bak
ln -s /usr/local/python2.7/bin/python2.7 /usr/bin/python

查看版本

[root@host Python-2.7.6]# python -V
Python 2.7.6

解决无法使用yum的问题

vi /usr/bin/yum

修改第一行的#!/usr/bin/python#!/usr/bin/python2.6

赞赏作者

如果觉得我的文章对你有用,请随意赞赏