我正在尝试在 Centos6 上编译 Python 2.7.3。几乎一切正常,除了我真正需要的东西 ^^。
当我输入 make 时,出现错误:
building '_ssl' extension
gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/usr/local/include -I/root/Python-2.7.3/Include -I/root/Python-2.7.3 -c /root/Python-2.7.3/Modules/_ssl.c -o build/temp.linux-i686-2.7/root/Python-2.7.3/Modules/_ssl.o
gcc -pthread -shared build/temp.linux-i686-2.7/root/Python-2.7.3/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.linux-i686-2.7/_ssl.so
*** WARNING: renaming "_ssl" since importing it failed: build/lib.linux-i686-2.7/_ssl.so: undefined symbol: krb5_auth_con_getrcache
最后,我收到一条消息,指出模块 _ssl 的构建失败(类似于这样)。
你遇到过这样的问题吗?我已经安装了 OpenSSL (0.9.8e fips) 和 OpenSSL-dev。
最佳答案
确保 openssl-dev(lib 和 include)的正确路径在您的 Makefile 中
关于python - 使用 SSL 支持编译 Python 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13442779/