centos5.5 安裝python2.6--171

  22  yum install sqlite-devel -y

  23  wget -c http://www.python.org/ftp/python/2.7/Python-2.7.tar.bz2  

  24  tar zxvf thrift-0.8.0.tar.gz >/dev/null

  25  cd thrift-0.8.0

  26  ll

  27  ./configure --with-ruby=no >> /dev/null

  28  ./configure --with-ruby=no

  29  cd ..

  30  ll

  31  tar jxvf Python-2.6.6.tar.bz2

  32  cd Python-2.6.6

  33  ll

  34  ./configure

  35  make && make install

  36  mv h/usr/bin/python /usr/bin/python.back

  37  mv /usr/bin/python /usr/bin/python.bak

  38  ln -s /usr/local/bin/python2.6 /usr/local/python


[root@localhost Python-2.6.6]# python

Python 2.6.6 (r266:84292, Nov 29 2012, 22:43:34)

[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>> quit

Use quit() or Ctrl-D (i.e. EOF) to exit

>>>

KeyboardInterrupt

>>> exit

Use exit() or Ctrl-D (i.e. EOF) to exit

>>> exit()

[root@localhost Python-2.6.6]# vim /usr/bin/yum

#!/usr/bin/python2.4


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章