我正在尝试使用 pip 安装 python-ldap 包。执行时出现以下错误pip install python-ldap
。我尝试根据这个问题安装与 ubuntu 17.10 ( Artful ) 对应的软件包,但还没有运气。我缺少什么包裹?
上述堆栈溢出问题的解决方案是安装
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
但在 17.10 中我看不到libsasl2-dev
&libldap2-dev
而我可以看到包libsasl-2-2
& libldap-2.4-2
。我将它们与phthon-dev
&一起安装libssl-dev
。但我仍然收到以下错误。似乎我缺少一些包含 lber.h 文件的软件包安装。
我得到的错误:
In file included from Modules/LDAPObject.c:8:0:
Modules/constants.h:7:10: fatal error: lber.h: No such file or directory
#include "lber.h"
^~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Python 版本 - 3.6.3
点子版本 - 19.1.1