如何在Ubuntu的virtualenv中安装python-ldap?

时间:2013-08-08 19:50:01

标签: python ubuntu ldap virtualenv

我一直在收到GCC编译错误:

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

error: command 'gcc' failed with exit status 1

1 个答案:

答案 0 :(得分:19)

我发现这篇博文有答案:

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

基本上,您需要确保安装了必要的开发库:

sudo apt-get install libsasl2-dev python-dev libldap2-dev libssl-dev