我正在尝试使用“easy_install”安装pyramid_ldap。我收到了这个错误。
Searching for pyramid-ldap
Best match: pyramid-ldap 0.1
Processing pyramid_ldap-0.1-py2.7.egg
pyramid-ldap 0.1 is already the active version in easy-install.pth
Using /usr/local/lib/python2.7/dist-packages/pyramid_ldap-0.1-py2.7.egg
Processing dependencies for pyramid-ldap
Searching for python-ldap
Reading http://pypi.python.org/simple/python-ldap/
Best match: python-ldap 2.4.19
Downloading https://pypi.python.org/packages/source/p/python-ldap/python-ldap-2.4.19.tar.gz#md5=b941bf31d09739492aa19ef679e94ae3
Processing python-ldap-2.4.19.tar.gz
Running python-ldap-2.4.19/setup.py -q bdist_egg --dist-dir /tmp/easy_install-XveA_W/python-ldap-2.4.19/egg-dist-tmp-z6mjwF
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
library_dirs: /opt/openldap-RE24/lib /usr/lib
libs: ldap_r
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:9:0:
Modules/errors.h:8:18: fatal error: lber.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1
我也尝试使用pip包管理器安装相同但没有用。请帮忙。
答案 0 :(得分:-1)
正如artemdevel指出的那样,如果我们正确安装指定的依赖项,则会解决此错误。在这种情况下,需要首先安装python-ldap包。