centos6 升级Python版本至2.7.8
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centos6 升级Python版本至2.7.8相关的知识,希望对你有一定的参考价值。
wget http://python.org/ftp/python/2.7.8/Python-2.7.8.tgz
[[email protected] ~]# tar zxvf Python-2.7.8.tgz
[[email protected] Python-2.7.8]# ./configure --prefix=/usr/local/python27
[[email protected] Python-2.7.8]# make && make install
[[email protected] Python-2.7.8]# ln -s /usr/local/python27/bin/py
[[email protected] Python-2.7.8]# ln -s /usr/local/python27/bin/python /usr/bin/
[[email protected] Python-2.7.8]# python -V
Python 2.7.8
解决yum的Python版本问题
[[email protected] Python-2.7.8]# vim /usr/bin/yum
#!/usr/bin/python2.6 Python2.6版本位置
[[email protected] Python-2.7.8]# yum
Loaded plugins: fastestmirror
You need to give some command
Usage: yum [options] COMMAND
List of Commands:
check Check for problems in the rpmdb
check-update Check for available package updates
clean Remove cached data
deplist List a package‘s dependencies
synchronization Synchronize installed packages to the latest available versions
downgrade downgrade a package
erase Remove a package or packages from your system
本文出自 “在路上” 博客,请务必保留此出处http://zailushang.blog.51cto.com/1199537/1743232
以上是关于centos6 升级Python版本至2.7.8的主要内容,如果未能解决你的问题,请参考以下文章
CentOS6.5自带Python2.6.6升级至Python2.7