目前的Python版本是2.4 …
yum upgrade python
给
Could not find update match for python
我必须从源代码安装吗?
是的,您需要从源代码安装,您可以使用以下内容:
wget http://www.python.org/ftp/python/2.5.2/Python-2.5.2.tgz tar fxz Python-2.5.2.tgz cd Python-2.5.2 ./configure make make install
这将安装Python 2.5作为命令python2.5,因为yum和CentOS的其他部分需要旧的Python 2.4,所以你将安装两个版本的Python。
/usr/bin/python - 2.4.3 /usr/bin/python2.5 - 2.5
./configure make make install
命令应该如下(根据2.7的README)
./configure make make altinstall
请参阅自述文件中的“安装多个版本”部分。
我有./configure这个错误
configure: error: no acceptable C compiler found in $PATH See `config.log' for more details.
所以,我安装了这些软件包
yum install gcc make
那么,它的工作;)