0

I'm trying to install python-ldap on a Gentoo Server. It is running a Django application which I want to use LDAP Auth. Im using virtualenv to manage my python dependencies. I can't install python-ldap with pip in my virtualenv. It always fails to compile the C parts. I tried to emerge openldap but I alway get "sasl.h no such file or directory". Have anyone managed to get python-ldap working on Gentoo? Im using Python 2.7

Regards, Philip

plaetzchen
  • 173
  • 1
  • 3
  • 9
  • What USE-flags to you use to emerge net-nds/openldap? If you do not need the server, you maybe want to enable the minimal USE-flag. You could also install python-ldap via portage. This will install all deps for you. – Alexander Sulfrian Sep 28 '12 at 12:23

2 Answers2

1
sudo emerge cyrus-sasl
sudo USE="minimal" emerge openldap

Now you can install python-ldap package from pip.

vigo
  • 111
  • 2
0

You need to install dev-libs/cyrus-sasl too as it provides the needed SASL headers. python-openldap compile fine on my machine. Just for information: my openldap USE flags are: "berkdb crypt ipv6 kerberos ssl syslog tcpd"

Uwe L. Korn
  • 224
  • 1
  • 14