我无法安装 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屋!
查看全文