问题
如何在Debian上安装用于Python 2.5的SSL?
我试过了:
sudo easy_install ssl但得到的是:
$ python setup.py build
looking for /usr/include/openssl/ssl.h
looking for /usr/include/krb5.h
running build
running build_py
running build_ext
building 'ssl._ssl2' extension
creating build/temp.linux-i686-2.5
creating build/temp.linux-i686-2.5/ssl
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I./ssl/2.5.1 -I/usr/include/python2.5 -c ssl/_ssl2.c -o build/temp.linux-i686-2.5/ssl/_ssl2.o
In file included from ssl/_ssl2.c:75:
./ssl/2.5.1/socketmodule.h:45:33: error: bluetooth/bluetooth.h: No such file or directory
./ssl/2.5.1/socketmodule.h:46:30: error: bluetooth/rfcomm.h: No such file or directory
./ssl/2.5.1/socketmodule.h:47:29: error: bluetooth/l2cap.h: No such file or directory
./ssl/2.5.1/socketmodule.h:48:27: error: bluetooth/sco.h: No such file or directory
In file included from ssl/_ssl2.c:75:
./ssl/2.5.1/socketmodule.h:98: error: field ‘bt_l2’ has incomplete type
./ssl/2.5.1/socketmodule.h:99: error: field ‘bt_rc’ has incomplete type
./ssl/2.5.1/socketmodule.h:100: error: field ‘bt_sco’ has incomplete type
error: command 'gcc' failed with exit status 1解决方案
sudo apt-get install libbluetooth-dev
sudo rm /usr/lib/python2.5/site-packages/ssl/__init__.pyc 发布于 2011-08-08 13:35:11
作为参考,您必须安装libbluetooth-dev。
发布于 2010-07-14 15:46:39
实际上,您不应该编译您自己版本的python ssl模块,原因如下:
获取python ssl模块的最好方法是使用apt-get从Debian官方存储库安装它:
apt-get install python-openssl希望这能有所帮助。
https://stackoverflow.com/questions/3241658
复制相似问题