免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5352 | 回复: 4
打印 上一主题 下一主题

redhat下安装python ldap库问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-03-25 11:15 |只看该作者 |倒序浏览
大家好,新接触python不久,希望在redhat下安装python的ldap库,在网上下了python-ldap的安装包,一直不成功,请大家帮忙看看,python是 2.7.3 的环境,ldap包是python-ldap-2.4.10.tar build和install时一直报如下错误:
# python setup.py install
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
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 -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.10 -IModules -I/opt/openldap-RE24/include -I/usr/include/sasl -I/usr/include -I/usr/local/python2.7/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:9:
Modules/errors.h:8:18: error: lber.h: No such file or directory
Modules/errors.h:9:18: error: ldap.h: No such file or directory
In file included from Modules/LDAPObject.c:9:
Modules/errors.h:12: error: expected 鈥鈥before 鈥鈥token
In file included from Modules/LDAPObject.c:11:
Modules/LDAPObject.h:12:2: error: #error Current python-ldap requires OpenLDAP 2.x
In file included from Modules/LDAPObject.c:11:
Modules/LDAPObject.h:23: error: expected specifier-qualifier-list before 鈥楲DAP鈥
Modules/LDAPObject.h:31: error: expected 鈥鈥before 鈥鈥token
In file included from Modules/LDAPObject.c:12:
Modules/ldapcontrol.h:11: error: expected 鈥鈥before 鈥鈥token
Modules/ldapcontrol.h:12: error: expected declaration specifiers or 鈥..鈥before 鈥楲DAPControl鈥
Modules/ldapcontrol.h:13: error: expected 鈥鈥before 鈥鈥token
In file included from Modules/LDAPObject.c:13:
Modules/message.h:11: error: expected 鈥鈥before 鈥鈥token
In file included from Modules/LDAPObject.c:14:
Modules/berval.h:10: warning: 鈥榮truct berval鈥declared inside parameter list
Modules/berval.h:10: warning: its scope is only this definition or declaration, which is probably not what you want
Modules/berval.h:12: warning: 鈥榮truct berval鈥declared inside parameter list
Modules/berval.h:13: warning: 鈥榮truct berval鈥declared inside parameter list
Modules/LDAPObject.c:18:18: error: sasl.h: No such file or directory
Modules/LDAPObject.c:26: error: expected 鈥鈥before 鈥鈥token
Modules/LDAPObject.c: In function 鈥榙ealloc鈥

                                               Modules/LDAPObject.c:42: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:43: error: 鈥楲DAPObject鈥has no member named 鈥榲alid鈥
Modules/LDAPObject.c:44: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:44: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:45: warning: implicit declaration of function 鈥榣dap_unbind_ext鈥
Modules/LDAPObject.c:45: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:46: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:46: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:47: error: 鈥楲DAPObject鈥has no member named 鈥榲alid鈥
Modules/LDAPObject.c:49: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c: In function 鈥榥ot_valid鈥

                                                                                                    Modules/LDAPObject.c:65: error: 鈥楲DAPObject鈥has no member named 鈥榲alid鈥
Modules/LDAPObject.c: At top level:
Modules/LDAPObject.c:76: error: expected 鈥鈥before 鈥鈥token
Modules/LDAPObject.c:103: error: expected 鈥鈥 鈥鈥 鈥鈥 鈥榓sm鈥or 鈥榑_attribute__鈥before 鈥鈥token
Modules/LDAPObject.c:194: error: expected 鈥鈥before 鈥鈥token
Modules/LDAPObject.c:206: error: expected 鈥鈥 鈥鈥 鈥鈥 鈥榓sm鈥or 鈥榑_attribute__鈥before 鈥鈥token
Modules/LDAPObject.c: In function 鈥榣_ldap_unbind_ext鈥

                                                         Modules/LDAPObject.c:332: error: 鈥楲DAPControl鈥undeclared (first use in this function)
Modules/LDAPObject.c:332: error: (Each undeclared identifier is reported only once
Modules/LDAPObject.c:332: error: for each function it appears in.)
Modules/LDAPObject.c:332: error: 鈥榮erver_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:333: error: 鈥榗lient_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:341: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:346: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:350: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:350: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:351: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:352: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:352: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:354: warning: implicit declaration of function 鈥楲DAPControl_List_DEL鈥
Modules/LDAPObject.c:357: error: 鈥楲DAP_SUCCESS鈥undeclared (first use in this function)
Modules/LDAPObject.c:358: warning: implicit declaration of function 鈥楲DAPerror鈥
Modules/LDAPObject.c:358: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:358: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c:360: error: 鈥楲DAPObject鈥has no member named 鈥榲alid鈥
Modules/LDAPObject.c: In function 鈥榣_ldap_abandon_ext鈥

                                                                                                                                         Modules/LDAPObject.c:373: error: 鈥楲DAPControl鈥undeclared (first use in this function)
Modules/LDAPObject.c:373: error: 鈥榮erver_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:374: error: 鈥榗lient_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:382: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:387: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:391: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:391: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:392: warning: implicit declaration of function 鈥榣dap_abandon_ext鈥
Modules/LDAPObject.c:392: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:393: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:393: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:398: error: 鈥楲DAP_SUCCESS鈥undeclared (first use in this function)
Modules/LDAPObject.c:399: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:399: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 鈥榣_ldap_add_ext鈥

                                                      Modules/LDAPObject.c:414: error: 鈥楲DAPControl鈥undeclared (first use in this function)
Modules/LDAPObject.c:414: error: 鈥榮erver_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:415: error: 鈥榗lient_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:419: error: 鈥楲DAPMod鈥undeclared (first use in this function)
Modules/LDAPObject.c:419: error: 鈥榤ods鈥undeclared (first use in this function)
Modules/LDAPObject.c:424: warning: implicit declaration of function 鈥楲ist_to_LDAPMods鈥
Modules/LDAPObject.c:429: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:434: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:438: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:438: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:439: warning: implicit declaration of function 鈥榣dap_add_ext鈥
Modules/LDAPObject.c:439: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:440: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:440: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:441: warning: implicit declaration of function 鈥楲DAPMods_DEL鈥
Modules/LDAPObject.c:445: error: 鈥楲DAP_SUCCESS鈥undeclared (first use in this function)
Modules/LDAPObject.c:446: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:446: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 鈥榣_ldap_simple_bind鈥

                                                          Modules/LDAPObject.c:462: error: 鈥楲DAPControl鈥undeclared (first use in this function)
Modules/LDAPObject.c:462: error: 鈥榮erver_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:463: error: 鈥榗lient_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:464: error: storage size of 鈥榗red鈥isn鈥檛 known
Modules/LDAPObject.c:467: error: 鈥榖er_len_t鈥undeclared (first use in this function)
Modules/LDAPObject.c:467: error: expected 鈥鈥before 鈥榗red_len鈥
Modules/LDAPObject.c:472: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:477: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:481: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:481: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:482: warning: implicit declaration of function 鈥榣dap_sasl_bind鈥
Modules/LDAPObject.c:482: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:482: error: 鈥楲DAP_SASL_SIMPLE鈥undeclared (first use in this function)
Modules/LDAPObject.c:483: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:483: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:488: error: 鈥楲DAP_SUCCESS鈥undeclared (first use in this function)
Modules/LDAPObject.c:489: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:489: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c:464: warning: unused variable 鈥榗red鈥
Modules/LDAPObject.c: At top level:
Modules/LDAPObject.c:553: error: expected declaration specifiers or 鈥..鈥before 鈥榮asl_interact_t鈥
Modules/LDAPObject.c: In function 鈥榠nteraction鈥

                                                                                                                                                         Modules/LDAPObject.c:562: error: 鈥榠nteract鈥undeclared (first use in this function)
Modules/LDAPObject.c:569: error: 鈥楲DAP_OPERATIONS_ERROR鈥undeclared (first use in this function)
Modules/LDAPObject.c:589: error: 鈥楲DAP_SUCCESS鈥undeclared (first use in this function)
Modules/LDAPObject.c: At top level:
Modules/LDAPObject.c:601: error: expected 鈥鈥before 鈥鈥token
Modules/LDAPObject.c: In function 鈥榣_ldap_sasl_interactive_bind_s鈥

                                                                      Modules/LDAPObject.c:627: error: 鈥楲DAPControl鈥undeclared (first use in this function)
Modules/LDAPObject.c:627: error: 鈥榮erver_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:628: error: 鈥榗lient_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:634: error: 鈥楲DAP_SASL_QUIET鈥undeclared (first use in this function)
Modules/LDAPObject.c:653: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:658: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:674: warning: implicit declaration of function 鈥榣dap_sasl_interactive_bind_s鈥
Modules/LDAPObject.c:674: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:677: error: expected expression before 鈥鈥token
Modules/LDAPObject.c:686: error: 鈥楲DAP_SUCCESS鈥undeclared (first use in this function)
Modules/LDAPObject.c:687: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:687: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 鈥榣_ldap_compare_ext鈥

                                                          Modules/LDAPObject.c:745: error: 鈥楲DAPControl鈥undeclared (first use in this function)
Modules/LDAPObject.c:745: error: 鈥榮erver_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:746: error: 鈥榗lient_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:751: error: storage size of 鈥榲alue鈥isn鈥檛 known
Modules/LDAPObject.c:754: error: 鈥榖er_len_t鈥undeclared (first use in this function)
Modules/LDAPObject.c:754: error: expected 鈥鈥before 鈥榲alue_len鈥
Modules/LDAPObject.c:759: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:764: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:768: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:768: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:769: warning: implicit declaration of function 鈥榣dap_compare_ext鈥
Modules/LDAPObject.c:769: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:770: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:770: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:775: error: 鈥楲DAP_SUCCESS鈥undeclared (first use in this function)
Modules/LDAPObject.c:776: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:776: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c:751: warning: unused variable 鈥榲alue鈥
Modules/LDAPObject.c: In function 鈥榣_ldap_delete_ext鈥

                                                                                                                       Modules/LDAPObject.c:790: error: 鈥楲DAPControl鈥undeclared (first use in this function)
Modules/LDAPObject.c:790: error: 鈥榮erver_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:791: error: 鈥榗lient_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:800: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:805: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:809: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:809: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:810: warning: implicit declaration of function 鈥榣dap_delete_ext鈥
Modules/LDAPObject.c:810: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:811: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:811: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:816: error: 鈥楲DAP_SUCCESS鈥undeclared (first use in this function)
Modules/LDAPObject.c:817: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:817: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 鈥榣_ldap_modify_ext鈥

                                                         Modules/LDAPObject.c:832: error: 鈥楲DAPControl鈥undeclared (first use in this function)
Modules/LDAPObject.c:832: error: 鈥榮erver_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:833: error: 鈥榗lient_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:837: error: 鈥楲DAPMod鈥undeclared (first use in this function)
Modules/LDAPObject.c:837: error: 鈥榤ods鈥undeclared (first use in this function)
Modules/LDAPObject.c:847: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:852: error: too many arguments to function 鈥楲DAPControls_from_object鈥
Modules/LDAPObject.c:856: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:856: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:857: warning: implicit declaration of function 鈥榣dap_modify_ext鈥
Modules/LDAPObject.c:857: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:858: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:858: error: 鈥楲DAPObject鈥has no member named 鈥榑save鈥
Modules/LDAPObject.c:864: error: 鈥楲DAP_SUCCESS鈥undeclared (first use in this function)
Modules/LDAPObject.c:865: error: 鈥楲DAPObject鈥has no member named 鈥榣dap鈥
Modules/LDAPObject.c:865: warning: return makes pointer from integer without a cast
Modules/LDAPObject.c: In function 鈥榣_ldap_rename鈥

                                                     Modules/LDAPObject.c:881: error: 鈥楲DAPControl鈥undeclared (first use in this function)
Modules/LDAPObject.c:881: error: 鈥榮erver_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:882: error: 鈥榗lient_ldcs鈥undeclared (first use in this function)
Modules/LDAPObject.c:892: error: too many arguments to function 鈥楲DAPControls_from_object鈥

论坛徽章:
6
CU大牛徽章
日期:2013-05-20 10:43:41IT运维版块每日发帖之星
日期:2016-07-29 06:20:00IT运维版块每日发帖之星
日期:2016-01-27 06:20:00CU大牛徽章
日期:2013-05-20 10:44:16CU大牛徽章
日期:2013-05-20 10:44:0615-16赛季CBA联赛之广东
日期:2018-03-09 11:17:08
2 [报告]
发表于 2013-03-25 13:41 |只看该作者
少了依赖包  error Current python-ldap requires OpenLDAP 2.x

论坛徽章:
0
3 [报告]
发表于 2013-03-25 16:25 |只看该作者
为什么我安装上了openldap-2.4.11还是不行呢回复 2# craaazy123


   

论坛徽章:
0
4 [报告]
发表于 2013-03-25 16:36 |只看该作者
刚才没有更改setup.cfg关于openldap的配置,产生了一些问题,配置好后,仍然有问题,但是感觉进了一步,请帮忙看看,谢谢
# python setup.py build
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /usr/local/openldap/include /usr/include/sasl /usr/include
library_dirs: /usr/local/openldap/bin /usr/lib
libs: ldap_r
running build
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 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'
running build_ext
building '_ldap' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/BerkeleyDB/include -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=2.4.10 -IModules -I/usr/local/openldap/include -I/usr/include/sasl -I/usr/include -I/usr/local/python2.7/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 鈥榮asl_interact_t鈥
Modules/LDAPObject.c: In function 鈥榠nteraction鈥

                                                                                                                                                         Modules/LDAPObject.c:562: error: 鈥榠nteract鈥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 鈥榩y_ldap_sasl_interaction鈥

                                                                Modules/LDAPObject.c:607: error: 鈥榮asl_interact_t鈥undeclared (first use in this function)
Modules/LDAPObject.c:607: error: 鈥榠nteract鈥undeclared (first use in this function)
Modules/LDAPObject.c:607: error: expected expression before 鈥鈥token
Modules/LDAPObject.c:610: error: 鈥楽ASL_CB_LIST_END鈥undeclared (first use in this function)
Modules/LDAPObject.c:612: error: too many arguments to function 鈥榠nteraction鈥
error: command 'gcc' failed with exit status 1


下面是setup.cfg的配置:
# more setup.cfg
[_ldap]
#library_dirs = /opt/openldap-RE24/lib /usr/lib
library_dirs = /usr/local/openldap/bin /usr/lib
include_dirs = /usr/local/openldap/include /usr/include/sasl /usr/include
#include_dirs = /opt/openldap-RE24/include /usr/include/sasl /usr/include
defines = HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args =
extra_objects =
libs = ldap_r

[install]
compile = 1
optimize = 1

[bdist_rpm]
provides = python-ldap
#requires =
requires = python libldap-2_4
vendor = python-ldap project
packager = Michael Stroeder <michael@stroeder.com>
distribution_name = Redhat
release = 1
doc_files = CHANGES README INSTALL TODO Demo/

[egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0
其中/usr/include/sasl是没有的,是否需要安装sasl呢?
回复 2# craaazy123


   

论坛徽章:
0
5 [报告]
发表于 2013-03-25 17:45 |只看该作者
已经解决了,需要安装sasl,并将setup.cfg中的路径配置好,具体路径可以参考error log中需要的文件

回复 1# psp2008xxx


   
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP