Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I can't install python-ldap

When I run the following command:

sudo pip install python-ldap 

I get this error:

In file included from Modules/LDAPObject.c:9:

Modules/errors.h:8: fatal error: lber.h: No such file or directory

Any ideas how to fix this?

like image 451
VacuumTube Avatar asked Jan 22 '11 14:01

VacuumTube


Video Answer


1 Answers

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 
like image 105
AndiDog Avatar answered Sep 21 '22 17:09

AndiDog