Pergunta

I am getting the following errors while installing python-ldap. Note that I have open-ldap, berkely db set up already on my system. The steps I followed are:

tar xvf python-ldap-2.4.10.tar.gz\
cd python-ldap-2.4.10\
#edit setup.cfg\
#library_dirs = /nlu/users/prefix /usr/lib\
#include_dirs = /nlu/users/prefix /usr/include/sasl /usr/include\
python setup.py install\

I get the following errors.

python setup.py install
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /nlu/users/prefix/include /usr/include/sasl /usr/include
library_dirs: /nlu/users/prefix/lib /usr/lib
libs: ldap_r
running install
running bdist_egg
running egg_info
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing Lib/python_ldap.egg-info/PKG-INFO
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
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
reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
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
running build_ext
building '_ldap' extension
gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -     I/nlu/users/indrani_gorti/prefix/include -fPIC -I/nlu/users/indrani_gorti/prefix/include -     fPIC -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -     DLDAPMODULE_VERSION=2.4.13 -IModules -I/nlu/users/prefix/include -  I/usr/include/sasl -I/usr/include -I/nlu/users/prefix/include/python2.7 -c       Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o
Modules/LDAPObject.c:18:18: error: sasl.h: No such file or directory
Modules/LDAPObject.c:553: error: expected declaration specifiers or '...' before     'sasl_interact_t'
Modules/LDAPObject.c: In function 'interaction':
Modules/LDAPObject.c:562: error: 'interact' undeclared (first use in this function)
Modules/LDAPObject.c:562: error: (Each undeclared identifier is reported only once
Modules/LDAPObject.c:562: error: for each function it appears in.)
Modules/LDAPObject.c: In function 'py_ldap_sasl_interaction':
Modules/LDAPObject.c:607: error: 'sasl_interact_t' undeclared (first use in this    function)
Modules/LDAPObject.c:607: error: 'interact' undeclared (first use in this function)
Modules/LDAPObject.c:607: error: expected expression before ')' token
Modules/LDAPObject.c:610: error: 'SASL_CB_LIST_END' undeclared (first use in this  function)
Modules/LDAPObject.c:612: error: too many arguments to function 'interaction'
error: command 'gcc' failed with exit status 1
Foi útil?

Solução

It might be a good idea to use the python package index, pip, to install ldap. Simply type:

pip install python-ldap

at a command prompt. Or, if you need admin privileges,

sudo pip install python-ldap
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top