python - 如何在 Debian Linux 上为 python 2.5 安装 SSL?

标签 python ssl installation

问题

如何在 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 

最佳答案

作为引用,您必须安装 libbluetooth-dev

关于python - 如何在 Debian Linux 上为 python 2.5 安装 SSL?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3241658/

相关文章:

python - 如何以图形方式编辑数学函数的图形(使用 python)?

python - 从列表类别创建递归列表

python - gRPC 客户端负载均衡

java - 限制 java ssl 调试日志记录

ssl - ZeroSSL 积分(相同的域,但我无法续订)

maven - 如何通过Maven正确安装和配置JSF库?

python - 我尝试在 python 上安装 httplib 但出现错误

python - boto.ec2.connection.EC2Connection.request_spot_instances() 不返回 boto.ec2.spotinstancerequest.SpotInstanceRequest

node.js - 如何修复在 nodejs 中缺少中间/链证书

R包安装