醉心于技术。
全部博文(119)
分类: 系统运维
2015-05-29 17:29:05
I just tested installing Python 2.3 with zlib support on one of our CentOS 6 servers and was able to do it as follows (installing everything into ~/python):
mkdir ~/src ~/python cd ~/src wget tar xjf zlib-1.2.5.tar.bz2 cd zlib-1.2.5 ./configure --prefix=$HOME/python make make install cd .. wget tar zxf Python-2.3.7.tgz cd Python-2.3.7 ./configure --prefix=$HOME/python --with-zlib=$HOME/python/include/ make make install
A quick test after the build shows that zlib is available and working:
$ ~/python/bin/python -c "import zlib;x = zlib.compress('foo');print zlib.decompress(x)" foo
Hope that helps!