7

I keep getting GCC compilation errors:

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

error: command 'gcc' failed with exit status 1
1

1 Answer 1

19

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
Sign up to request clarification or add additional context in comments.

4 Comments

Good find. If you plan to compile from source more often, the 'build-essential' meta package is good to have aboard as well.
I didn't know about this! Link for the lazy: packages.ubuntu.com/lucid/build-essential
Appreciated, your answer helped me too. :)
This does not work on Ubuntu 16.x. I do not know why. But it gives the same complaint even after the apt-get line above.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.