我如何让python与libz一起编译? [英] how do I get python to compile with libz?

查看:150
本文介绍了我如何让python与libz一起编译?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚从源代码编译的python 3.3版本:

the version of python 3.3 I just compiled from source:

$ ldd ./python
    linux-gate.so.1 =>  (0xb776c000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb773b000)
    libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7736000)
    libutil.so.1 => /lib/i386-linux-gnu/libutil.so.1 (0xb7731000)
    libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb7707000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb7589000)
    /lib/ld-linux.so.2 (0xb776d000)

相对于我的python3(3.2)系统版本:

versus my system version of python3 (3.2):

$ ldd `which python3`
    linux-gate.so.1 =>  (0xb7777000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb7746000)
    libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb7741000)
    libutil.so.1 => /lib/i386-linux-gnu/libutil.so.1 (0xb773c000)
    libssl.so.1.0.0 => /lib/i386-linux-gnu/libssl.so.1.0.0 (0xb76ef000)
    libcrypto.so.1.0.0 => /lib/i386-linux-gnu/libcrypto.so.1.0.0 (0xb754b000)
    libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb7536000)
    libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb750c000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb738d000)
    /lib/ld-linux.so.2 (0xb7778000)

libz和其他一些库由于某种原因而丢失.我在此处尝试了解决方案,但无效.我很困惑-有什么想法吗?

libz and some other libraries are missing, for some reason. I tried the solution here, but it didn't work. I'm stumped - any ideas?

推荐答案

答案似乎在模块/设置"(和模块/Setup.dist")中.取消注释行 358 达到了目的:

It looks like the answer was in Modules/Setup (and Modules/Setup.dist). Uncommenting line 358 did the trick:

# Andrew Kuchling's zlib module.
# This require zlib 1.1.3 (or later).
# See http://www.gzip.org/zlib/
zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz

这篇关于我如何让python与libz一起编译?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆