python-ldap OS X 10.6 and Python 2.6
Asked Answered
S

4

7

Trying to install python-ldap for my Django project -- so far tried easy_install, pip, as well as building myself, but still getting the same errors:

dlopen(/Library/Python/2.6/site-packages/_ldap.so, 2): Symbol not found: _ldap_create_assertion_control_value
Referenced from: /Library/Python/2.6/site-packages/_ldap.so
Expected in: flat namespace
in /Library/Python/2.6/site-packages/_ldap.so

What's going on?

Starstarboard answered 25/6, 2011 at 1:1 Comment(0)
Y
7

The problem and solution are documented here.

Summary: The 10.7.{0,1} system tools and headers are all from OpenLDAP 2.4.x while the libraries are from OpenLDAP 2.2.0. The solution is to build the OpenLDAP libs to match the system headers and link python-ldap with those.

All credit goes to Rob McBroom.

Yves answered 19/8, 2011 at 17:22 Comment(0)
D
7

pip install python-ldap==2.3.13 did the trick for me (Mac OS X 10.6)

Dwaynedweck answered 3/8, 2011 at 11:26 Comment(0)
Y
7

The problem and solution are documented here.

Summary: The 10.7.{0,1} system tools and headers are all from OpenLDAP 2.4.x while the libraries are from OpenLDAP 2.2.0. The solution is to build the OpenLDAP libs to match the system headers and link python-ldap with those.

All credit goes to Rob McBroom.

Yves answered 19/8, 2011 at 17:22 Comment(0)
C
2

I encountered the same error under 10.7 (Lion) using easy_install and pip. Manually installing 2.3.13 was the answer there as well.

Copulation answered 28/7, 2011 at 12:46 Comment(0)
S
1

I had to modify setup.cfg to get this to work on OS X. Here's what I did:

wget http://python-ldap.cvs.sourceforge.net/viewvc/python-ldap/?view=tar --output-document=python-ldap.tar.gz
tar xvf python-ldap.tar.gz
cd python-ldap

Modify the following lines in setup.cfg:

library_dirs = /usr/local/lib
include_dirs = /usr/local/include /usr/include/sasl
libs = ldap lber sasl2 ssl crypto

Then continue with "normal" installation:

python setup.py build
sudo python setup.py install
Sciatica answered 27/6, 2011 at 16:48 Comment(2)
Unfortunately it's the same thing :/Starstarboard
I have decided to go with python-ldap 2.3.13 -- it seems work when built from source.Starstarboard

© 2022 - 2024 — McMap. All rights reserved.