python - 如何在 Ubuntu Server 12.04 上使用 zlib 构建 Python 2.6.8?

标签 python compilation makefile zlib python-2.6

据我所知,缺少 zlib 是 Python 2.6 的常见问题。

我安装了 zlib1g-dev,并且我也尝试了 this解决方案 - 但仍然没有成功。

我也尝试过 ./configure --with-libs=usr/include/zlib.h 并得到:

libpython2.6.a /usr/include/zlib.h -lpthread -ldl  -lutil   -lm  
running build
running build_ext
INFO: Can't locate Tcl/Tk libs and/or headers

其他人也遇到过这种情况吗?

最佳答案

要获得 zlib 支持,您需要在编译 python 时设置一些标志,如此处所述。 http://ubuntuforums.org/showthread.php?t=1759873&p=10830295#post10830295

对于 ssl 支持,您需要应用此处讨论的补丁: http://ubuntuforums.org/showthread.php?t=1976837

关于python - 如何在 Ubuntu Server 12.04 上使用 zlib 构建 Python 2.6.8?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15186974/

相关文章:

python - 获取查询返回的文档数

php - 已解决 : Compiling PHP with GD : relocation R_X86_64_PC32 against symbol `WebPMemoryWrite' can not be used when making a shared object;

compilation - linux内核编译: ERROR: "function" [path/to/module/module. ko]未定义

python - 在 Makefile 中嵌入 Python 来设置 make 变量

java - 如何调试这个Makefile

python - 是否可以在 Anaconda 中锁定包的版本?

python - 不规则多面体的体积

python - 试图从 scipy powerlaw fit 中获得合理的值(value)

iphone - 为 iPhone 编译 C lib

windows - 如何使用 MinGW 在 Windows 上构建 Qt QOCI(Oracle 数据库驱动程序)?