- 论坛徽章:
- 4
|
环境:Linux, 64bit, python2.7.3/python3.2.3, openssl1.0.1/openssl9.7.0
编译:
1, openssl :
./config --prefix=/home/liangdong/libs
make -t
make depend
2, python:
./configure --prefix=/home/liangdong/libs
make & make install
分析:
从make打印的gcc command来看, 的确是指定了正确的Library路径, 可以找到libssl.so和libcrypto.so, 但我没看懂:
renaming "_hashlib" since importing it failed: libssl.so.1.0.0: cannot open shared object file: No such file or directory
这是想要表达什么意思, 无论如何, 我尝试了各种尝试, 谷歌了各种百度, 百度了各种谷歌, 最终未能resolve.
Python与openssl版本分别尝试过两个, 总共2 * 2 = 4种搭配方式, 未能成功, 错误相同, 希望找到遇过同样错误的有缘人.
编译时,
_posixsubprocess也报错, 我进去改了一下源码就好了, 但这个ssl找不到的问题我就很费解了, 应该是libssl.so 软链的 libssl.so.1.0.1 找不到, 这尼玛有找不到的理由吗? 不懂.
24小时围观此贴, 坐等好人.- [liangdong@bb-browser-test00.vm.baidu.com Python-2.7.3]$ make
- -----------------------------------------------
- Modules/Setup.dist is newer than Modules/Setup;
- check to make sure you have all the updates you
- need in your Modules/Setup file.
- Usually, copying Modules/Setup.dist to Modules/Setup will work.
- -----------------------------------------------
- running build
- running build_ext
- building dbm using gdbm
- INFO: Can't locate Tcl/Tk libs and/or headers
- building '_ssl' extension
- gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/home/liangdong/libs/include -I. -IInclude -I./Include -I/usr/local/include -I/home/liangdong/tars/Python-2.7.3/Include -I/home/liangdong/tars/Python-2.7.3 -c /home/liangdong/tars/Python-2.7.3/Modules/_ssl.c -o build/temp.linux-x86_64-2.7/home/liangdong/tars/Python-2.7.3/Modules/_ssl.o
- gcc -pthread -shared -L/home/liangdong/libs -L/home/liangdong/libs build/temp.linux-x86_64-2.7/home/liangdong/tars/Python-2.7.3/Modules/_ssl.o -L/home/liangdong/libs/lib -L/home/liangdong/libs -L/usr/local/lib -lssl -lcrypto -o build/lib.linux-x86_64-2.7/_ssl.so
- *** WARNING: renaming "_ssl" since importing it failed: libssl.so.1.0.0: cannot open shared object file: No such file or directory
- building '_hashlib' extension
- gcc -pthread -fPIC -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/home/liangdong/libs/include -I. -IInclude -I./Include -I/usr/local/include -I/home/liangdong/tars/Python-2.7.3/Include -I/home/liangdong/tars/Python-2.7.3 -c /home/liangdong/tars/Python-2.7.3/Modules/_hashopenssl.c -o build/temp.linux-x86_64-2.7/home/liangdong/tars/Python-2.7.3/Modules/_hashopenssl.o
- gcc -pthread -shared -L/home/liangdong/libs -L/home/liangdong/libs build/temp.linux-x86_64-2.7/home/liangdong/tars/Python-2.7.3/Modules/_hashopenssl.o -L/home/liangdong/libs/lib -L/home/liangdong/libs -L/usr/local/lib -lssl -lcrypto -o build/lib.linux-x86_64-2.7/_hashlib.so
- *** WARNING: renaming "_hashlib" since importing it failed: libssl.so.1.0.0: cannot open shared object file: No such file or directory
- Python build finished, but the necessary bits to build these modules were not found:
- _tkinter bsddb185 dl
- imageop sunaudiodev
- To find the necessary bits, look in setup.py in detect_modules() for the module's name.
- Failed to build these modules:
- _hashlib _ssl
- running build_scripts
复制代码 |
|