LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   easy_install python-ldap Error (https://www.linuxquestions.org/questions/linux-software-2/easy_install-python-ldap-error-889145/)

x201s 06-30-2011 03:44 AM

easy_install python-ldap Error
 
Hello,
I am trying to install python-ldap using easy_install.
OS is RHEL 5.6. I need to use python 2.6, so I installed python 2.6 in /usr/local/bin.
Then I installed easy install with /usr/local/bin/python ez_setup.py.
So far so good.
But when I entered "easy_install python-ldap", I got the following error.
I did some search, but could not make it work, so I am here.
Please point me to a right direction.
Thanks.

Code:

[root@localhost ~]# easy_install python-ldap
Searching for python-ldap
Reading http://pypi.python.org/simple/python-ldap/
Reading http://www.python-ldap.org/
Best match: python-ldap 2.4.0
Downloading http://pypi.python.org/packages/source/p/python-ldap/python-ldap-2.4
.0.tar.gz#md5=5df874e9fb401e4bc0691c36b704a017
Processing python-ldap-2.4.0.tar.gz
Running python-ldap-2.4.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-IhN
Tbk/python-ldap-2.4.0/egg-dist-tmp-zlIxyi
extra_compile_args: -g
extra_objects:
include_dirs: /opt/openldap-RE24/include /usr/include/sasl
library_dirs: /opt/openldap-RE24/lib
libs: ldap_r lber sasl2 ssl crypto
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
In file included from Modules/LDAPObject.c:18:
/usr/include/sasl/sasl.h:349: warning: function declaration isn’t a prototype
Modules/ldapcontrol.c: In function ‘encode_assertion_control’:
Modules/ldapcontrol.c:350: warning: implicit declaration of function ‘ldap_create_assertion_control_value’
Modules/constants.c: In function ‘LDAPinit_constants’:
Modules/constants.c:153: error: ‘LDAP_OPT_DIAGNOSTIC_MESSAGE’ undeclared (first use in this function)
Modules/constants.c:153: error: (Each undeclared identifier is reported only once
Modules/constants.c:153: error: for each function it appears in.)
Modules/constants.c:360: error: ‘LDAP_CONTROL_RELAX’ undeclared (first use in this function)
error: Setup script exited with error: command 'gcc' failed with exit status 1
[root@localhost ~]#

I do not have "openldap-RE24" in /opt.

x201s 07-01-2011 12:19 AM

140+ people visiting this question, yet nobody offers any idea?

knudfl 07-01-2011 12:58 AM

First : You are not supposed to have /usr/local/bin/python.
May disturb some system functions. Suggest : Delete the python in /usr/local.

( A manual install could live in /opt/python26/ ).

The proof way : # yum install python26 python26-ldap

'python26' is in the EPEL repo https://fedoraproject.org/wiki/EPEL
"Extra Packages for Enterprise Linux".

x201s 07-02-2011 02:24 PM

knudfl:
What can I say? I did what you suggested, and it works!!!
I owe you a big thank you.
THANK YOU.
People like you make this forum a place of hope for everyone!

Some notes:
To add epel repo, I did:
rpm -Uvh http://download.fedora.redhat.com/pu...5-4.noarch.rpm

Then I did
yum update

Then I ran
yum install python26 python26-ldap

I had a successful install because when I typed python26, I could see python 2.6 console.

BTW, the python 2.6 has been installed in
/usr/bin/python26

**Feeling good now **

Let me close this thread as the case has been solved.

Cheers,


All times are GMT -5. The time now is 12:23 PM.