我无法安装python-ldap [英] I can't install python-ldap
本文介绍了我无法安装python-ldap的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我运行以下命令时:
sudo pip install python-ldap
我收到此错误:
在Modules/LDAPObject.c:9中包含的文件中:
In file included from Modules/LDAPObject.c:9:
Modules/errors.h:8:致命错误:lber.h:没有此类文件或目录
Modules/errors.h:8: fatal error: lber.h: No such file or directory
有什么办法解决这个问题吗?
Any ideas how to fix this?
推荐答案
python-ldap 是基于OpenLDAP,因此您需要具有开发文件(标头)才能编译Python模块.如果您使用的是Ubuntu,则该程序包称为libldap2-dev
.
The python-ldap is based on OpenLDAP, so you need to have the development files (headers) in order to compile the Python module. If you're on Ubuntu, the package is called libldap2-dev
.
Debian/Ubuntu :
sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
RedHat/CentOS :
sudo yum install python-devel openldap-devel
这篇关于我无法安装python-ldap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文