我正在尝试在Windows 7 Cygwin上安装pycurl。我在该环境中运行easy_install,但是命令
easy_install pycurl
给出了一堆未定义的符号错误:
/tmp/easy_install-A69Atd/pycurl-7.19.3.1/src/pycurl.c:688: undefined reference to `CRYPTO_set_id_callback'
/tmp/easy_install-A69Atd/pycurl-7.19.3.1/src/pycurl.c:688:(.text+0x70f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `CRYPTO_set_id_callback'
/tmp/easy_install-A69Atd/pycurl-7.19.3.1/src/pycurl.c:689: undefined reference to `CRYPTO_set_locking_callback'
/tmp/easy_install-A69Atd/pycurl-7.19.3.1/src/pycurl.c:689:(.text+0x716): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `CRYPTO_set_locking_callback'
build/temp.cygwin-1.7.29-x86_64-2.7/src/pycurl.o: In function `pycurl_ssl_init':
/tmp/easy_install-A69Atd/pycurl-7.19.3.1/src/pycurl.c:671: undefined reference to `CRYPTO_num_locks'
/tmp/easy_install-A69Atd/pycurl-7.19.3.1/src/pycurl.c:671:(.text+0xaf7c): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `CRYPTO_num_locks'
/tmp/easy_install-A69Atd/pycurl-7.19.3.1/src/pycurl.c:679: undefined reference to `CRYPTO_set_id_callback'
/tmp/easy_install-A69Atd/pycurl-7.19.3.1/src/pycurl.c:679:(.text+0xafd3): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `CRYPTO_set_id_callback'
/tmp/easy_install-A69Atd/pycurl-7.19.3.1/src/pycurl.c:680: undefined reference to `CRYPTO_set_locking_callback'
/tmp/easy_install-A69Atd/pycurl-7.19.3.1/src/pycurl.c:680:(.text+0xafdf): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `CRYPTO_set_locking_callback'
有关解决方法的任何想法吗?
答案 0 :(得分:1)
库中setup.py
缺少-lcrypto
class ExtensionConfiguration(object):
def __init__(self):
self.include_dirs = []
self.define_macros = [("PYCURL_VERSION", '"%s"' % VERSION)]
self.library_dirs = []
self.libraries = []
更改self.libraries
以包含crypto
:
self.libraries = ["crypto"]