尝试安装Pyramid_ldap时出错

问题描述:

我正尝试使用“easy_install”安装pyramid_ldap。我得到这个错误。尝试安装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

是否安装了所需的依赖关系,如http://pyramid-ldap.readthedocs.org/en/latest/中所述?至少你需要安装python-ldap才能安装pyramid_ldap package – artemdevel 2015-02-09 09:41:21

+0

不,我错过了那一步。它现在安装正确。谢谢 :) – Tania 2015-02-09 10:03:49

正如artemdevel指出的那样,如果我们正确安装指定的依赖关系,则会解决此错误。在这种情况下,需要首先安装python-ldap软件包。