Chinaunix首页 | 论坛 | 博客
  • 博客访问: 399008
  • 博文数量: 119
  • 博客积分: 25
  • 博客等级: 民兵
  • 技术积分: 1061
  • 用 户 组: 普通用户
  • 注册时间: 2012-10-14 12:48
个人简介

醉心于技术。

文章分类

全部博文(119)

文章存档

2018年(34)

2016年(1)

2015年(4)

2014年(6)

2013年(74)

我的朋友

分类: 系统运维

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!

阅读(1870) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~