1

我从http://pypi.python.org/pypi/python-ldap/2.3.13下载了 Python LDAP 2.3.13但是在尝试构建它时给了我以下错误:

ldap/python-ldap-2.3.13> python setup.py build
extra_compile_args:
extra_objects:
include_dirs: /usr/local/openldap-2.3/include /usr/include/sasl
library_dirs: /usr/local/openldap-2.3/lib
libs: ldap_r lber sasl2 ssl crypto
running build
running build_py
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
creating build
creating build/lib.linux-x86_64-2.7
copying Lib/ldapurl.py -> build/lib.linux-x86_64-2.7
copying Lib/ldif.py -> build/lib.linux-x86_64-2.7
copying Lib/dsml.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/__init__.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/controls.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-2.7/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-2.7/ldap
creating build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/__init__.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-2.7/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-2.7/ldap/schema
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
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/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'
running build_ext
building '_ldap' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/Modules
-DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.13 -IModules -I/usr/local/openldap-2.3/include -I/usr/include/sasl -I/snaps14/satprasad/bin/python/usr/local/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o
unable to execute -DHAVE_LIBLDAP_R: No such file or directory
error: command '-DHAVE_LIBLDAP_R' failed with exit status 1
ldap/python-ldap-2.3.13>

请让我知道如何解决这个问题?

4

0 回答 0