LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-30-2011, 03:44 AM   #1
x201s
Member
 
Registered: Dec 2010
Posts: 67

Rep: Reputation: 0
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.
 
Old 07-01-2011, 12:19 AM   #2
x201s
Member
 
Registered: Dec 2010
Posts: 67

Original Poster
Rep: Reputation: 0
140+ people visiting this question, yet nobody offers any idea?
 
Old 07-01-2011, 12:58 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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".
 
Old 07-02-2011, 02:24 PM   #4
x201s
Member
 
Registered: Dec 2010
Posts: 67

Original Poster
Rep: Reputation: 0
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,
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python 2.6 dependencies error installing python-sqlite2-2.5.5-1.1.i586.rpm jmp007 Linux - Newbie 1 02-11-2011 11:05 AM
[SOLVED] Python Installed; bash command: python base.py. gets syntax error in base.py cre84j Linux - Software 4 01-23-2011 04:46 PM
LDAP configuration error, can't connect to LDAP server (-1) rdanielz Linux - Networking 3 06-01-2010 09:15 AM
python-ldap: How to catch an error on binding? eantoranz Programming 0 09-04-2008 09:21 AM
Issues Building Python-ldap Pratt Slackware 5 07-24-2008 04:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration