[python-ldap] Installation instructions, python-ldap for HP-UX

Bill Allen wallenpb at gmail.com
Sun Feb 10 07:41:39 CET 2013


Michael,



I found that I had ssl and sasl dependencies, so I have install OpenLDAP,
openssl, and cyrus-sasl for HP-UX.   I ran python setup.py build and python
setup.py install with the follwing setup.cfg and the build and install
completed successfully, but I do still have a problem as noted below.

[_ldap]
library_dirs = /usr/local/lib
include_dirs = /usr/local/include

extra_compile_args = -g
extra_objects =

libs = ldap_r

Now, when I run the Python interpreter and try to import ldap I get the
following error:

>>> import ldap
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/opt/iexpress/python/lib/python2.7/site-packages/python_ldap-2.4.10-py2.7-hp-ux-B.11.31-ia64.egg/ldap/__init__.py",
line 22, in <module>
    import _ldap
ImportError: Failed to load
/opt/iexpress/python/lib/python2.7/site-packages/python_ldap-2.4.10-py2.7-hp-ux-B.11.31-ia64.egg/_ldap.so
On Sat, Feb 9, 2013 at 5:56 AM, Michael Ströder <michael at stroeder.com>wrote:

>  Bill Allen wrote:
> > I have installed open-ldap on my HP-UX server, but I am having trouble
> > installing the python-ldap software.  It appears that I need to adjust
> > the config file in some way, but I am unclear what the configuration
> > setting sets for HP-UX need to be for the install to work.   Has
> > anyone successfuly installed on HP-UX?
>
> Are you familiar with compiling software written in C?
> Did you already install all the software required to build python-ldap?
>
> http://www.python-ldap.org/doc/html/installing.html#prerequisites
>
> The set of software depends on your requirements. But basically you have to
> build and install at least Python and the OpenLDAP libs.
>
> Ciao, Michael.
>
Michael,
So you know what I am trying to do, my target application is a Python CGI,
that will be running on an HP-UX Apache web server, that will allow users
at my location to self-service reset their Active Directory passwords.   I
have coded other Python CGI applications running on this server, just have
never had to used the Python-LDAP module before.  Yes, I have the Python
installed (2.7.1) and the OpenLDAP (2.4.33).   In HP-UX, OpenLDAP goes into
various folders in the /usr/local tree.  I have compiled C before and have
gcc installed, usually by following instructions for make/make install.  I
have looked at the default setup.cfg in the Python-LDAP distribution tar
and think I might know how to modify it to fit my sitituation to be able to
do a normal python setup.py build, python setup.py install.     This is how
I think I should do the setup.cfg, does this look right?

[_ldap]
library_dirs = /usr/local/lib
include_dirs = /usr/local/include

extra_compile_args = -g
extra_objects =

libs = ldap_r

If you do not think this is the way for me to go with this, then perhaps a
C compile would be best for my situation.   Please advise, and I appreciate
your help.

Thanks,
Bill A.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ldap/attachments/20130210/11375d05/attachment-0001.html>


More information about the python-ldap mailing list