默認系統自帶的2.4,版本過低,這裏直接安裝最新版本2.7
wget http://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2 tar jfvx Python-2.7.tar.bz2 ./configure make all make install make clean make distclean
查看版本
/usr/local/bin/python2.7 -V
再編譯node.js的時候,發現報“importerror no module named bz2 centos”,再裝bzip2
yum install -y bzip2*
再編譯python2.7再安裝node.js,狗血的一塌糊塗。
wget http://nodejs.org/dist/v0.8.16/node-v0.8.16.tar.gz
./configure && make && make install
編譯需要老半天 ORZ…
總算是OK了,真不容易~ ~
參考:
centos/linux 安裝 node.js 狗血事二三件
[nodejs]-如何在八戒上搭建nodejs環境
Centos 5.5升級Python到2.7版本