Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install python-ldap in a virtualenv on Ubuntu?

I keep getting GCC compilation errors:

$ pip install python-ldap
...
compilation terminated.

error: command 'gcc' failed with exit status 1
like image 288
Jace Browning Avatar asked Aug 08 '13 19:08

Jace Browning


1 Answers

I found this blog post which has the answer:

http://blog.mattwoodward.com/2012/10/installing-python-ldap-in-virtualenv-on.html

Essentially, you need to ensure you have the necessary development libraries installed:

sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev
like image 142
Jace Browning Avatar answered Nov 04 '22 08:11

Jace Browning