我需要在没有root访问权限的RHEL上安装几个Python模块。至少一个模块还需要访问Python.h。
在这种情况下,我发现最好的方法是安装python及其依赖项~/local。它通常只能工作,但是这次Python无法构建SSL模块(请参见下面的详细信息)。这是我在做什么的痕迹。
所以我下载了python 6源码,然后我去了:
./configure --prefix=/home/fds/rms/local
make >& make.log
日志检查显示ssl模块尚未编译,但未提及原因(make或configure中没有其他发生ssl的事件):
Failed to find the necessary bits to build these modules:
_bsddb _curses _curses_panel
_hashlib _sqlite3 _ssl <----------
因此,我认为python根本找不到任何ssl库(这很奇怪,但是...)。所以我下载了openssl-0.9.8r和
./config --prefix=/home/fds/rms/local shared
make
make install
现在回到Python,我重新配置。它失败,但是这次有所不同:
Failed to build these modules:
_hashlib _ssl
仔细查看日志文件可以发现:
gcc -pthread -shared build/temp.linux-x86_64-2.6/home/fds/rms/installers/Python-2.6.6/Modules/_ssl.o -L/home/fds/rms/local/lib -L/usr/local/lib -lssl -lcrypto -o build/lib.linux-x86_64-2.6/_ssl.so
*** WARNING: renaming "_ssl" since importing it failed: libssl.so.0.9.8: cannot open shared object file: No such file or directory
因此,现在它选择的是库,但并没有完全正确(文件应该在应有的位置):
$ find /home/fds/rms/local -iname libssl.so.0.9.8
/home/fds/rms/local/lib/libssl.so.0.9.8
嗯,它到了所有错误的地方。我尝试给出一个提示:
CPPFLAGS="-I/home/fds/rms/local/include -I/home/fds/rms/local/include/openssl" LDFLAGS="-L/home/fds/rms/local/lib" ./configure --prefix=/home/fds/rms/local
但是什么都没有改变,make似乎根本没有尝试/home/fds/rms/local/lib。
我已经好几年没有这样做了,所以也许我忽略了某些事情。谁能解决这个问题?
提前致谢。
喵喔喔
慕工程0101907
相关分类