Skip to content

Lawtec

Sections
Personal tools
You are here: Home Members antonh's Home Articles Sep2003 Installing python-ldap on Mandrake 9.1
Document Actions

Installing python-ldap on Mandrake 9.1

by antonh last modified 07-Sep-06 11:48 AM

Well, it's been interesting. I've tried to install it before, and always hit a brick wall when testing it with 'import ldap' - I got an undefined_first_reference error. So here is how I actually got it installed and working...

1. The error I mentioned originates in OpenLDAP. So I went to http://ranger.dnsalias.com/mandrake/9.1/openldap/ and got these packages:


2. Installed them all using rpm -Uvh .

3. Downloaded python-ldap-2.0.0pre13.tgz from http://python-ldap.sourceforge.net/ and unzipped it in /usr/local/src

4. Edited 2 lines setup.cfg so that it read as follows:

library_dirs = /usr/local/lib /usr/lib
include_dirs = /usr/local/include /usr/include

5. Typed the following commands to build and install:

# python2.2 setup.py build
# python2.2 setup.py install

Done! If you don't see an error message when typing the following in, then everything has worked properly.

# python2.2 -c "import ldap"

 


This site conforms to the following standards: