ubuntu10.4 安装python2.6.6

1. 安装python2.6.6之前,先更新依赖包

sudo apt-get install -y build-essential

sudo apt-get install -y libncursesw5-dev

sudo apt-get install -y libssl

sudo apt-get install -y libssl-dev

sudo apt-get install -y python-dev

sudo apt-get install -y libreadline5-dev  

sudo apt-get install -y libgdbm-dev

sudo apt-get install -y libc6-dev

sudo apt-get install -y libsqlite3-dev

sudo apt-get install -y tk-dev

sudo apt-get install -y ruby

sudo apt-get install -y zlib1g

sudo apt-get install -y zlib1g.dev

sudo apt-get install -y libbz2-dev

sudo apt-get install -y libdb-dev

sudo apt-get install -y lzma-dev


2. 安装python2.6.6

sudo ./configure --prefix=/path/python266

make

make install

你可能感兴趣的:(ubuntu)