2011-06-29 23 views
-2

ソースから最新のpython-ldapを入手しました。私はpython 2.7.2のソースコンパイル版も実行しています。これをRHEL上で実行しています。だから私がパッケージをコンパイルしようとすると、私は以下のようにこの長いエラーメッセージを受け取ります。だから私はopenldap-develパッケージをインストールしましたが、現在はずっと小さなエラーです。しかし、まだコンパイルしていない。Python-LDAPはコンパイルされません

extra_compile_args: -g 
extra_objects: 
include_dirs: /opt/openldap-RE24/include /usr/include/sasl 
library_dirs: /opt/openldap-RE24/lib 
libs: ldap_r lber sasl2 ssl crypto 
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_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.4.1 -IModules -I/opt/openldap-RE24/include -I/usr/include/sasl -I/opt/home/mradmin/.local/include/python2.7 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-2.7/Modules/LDAPObject.o -g 
In file included from Modules/LDAPObject.c:18: 
/usr/include/sasl/sasl.h:349: warning: function declaration isnât a prototype 
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.4.1 -IModules -I/opt/openldap-RE24/include -I/usr/include/sasl -I/opt/home/mradmin/.local/include/python2.7 -c Modules/ldapcontrol.c -o build/temp.linux-x86_64-2.7/Modules/ldapcontrol.o -g 
Modules/ldapcontrol.c: In function âencode_assertion_controlâ: 
Modules/ldapcontrol.c:350: warning: implicit declaration of function âldap_create_assertion_control_valueâ 
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.4.1 -IModules -I/opt/openldap-RE24/include -I/usr/include/sasl -I/opt/home/mradmin/.local/include/python2.7 -c Modules/common.c -o build/temp.linux-x86_64-2.7/Modules/common.o -g 
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DHAVE_LIBLDAP_R -DHAVE_SASL -DHAVE_TLS -DLDAPMODULE_VERSION=2.4.1 -IModules -I/opt/openldap-RE24/include -I/usr/include/sasl -I/opt/home/mradmin/.local/include/python2.7 -c Modules/constants.c -o build/temp.linux-x86_64-2.7/Modules/constants.o -g 
Modules/constants.c: In function âLDAPinit_constantsâ: 
Modules/constants.c:153: error: âLDAP_OPT_DIAGNOSTIC_MESSAGEâ undeclared (first use in this function) 
Modules/constants.c:153: error: (Each undeclared identifier is reported only once 
Modules/constants.c:153: error: for each function it appears in.) 
Modules/constants.c:363: error: âLDAP_CONTROL_RELAXâ undeclared (first use in this function) 
error: command 'gcc' failed with exit status 1 

これは質問のため閉鎖されていますので、これは私に助けてくださいませんか?私はそれを考え出した。最新のldap、berkleydbを手作業でコンパイルしてからビルドを実行しなければなりませんでした。その後、それは細かく構築されました

+2

これはたくさんのテキストです。どこかに質問がありますか? –

+0

@George Cumminsはい、PythonでLDAPをコンパイルする方法。 – phihag

+1

@Nerdtasticコードとコード出力の場合は、引用符ではなくコードの書式設定(Ctrl + K)を使用する必要があります。行の終わりを引用して破棄します。また、最初のエラーの後にすべてをスナップすることもできます。 – phihag

答えて

2

最初と2番目のエラーメッセージの状態は、あなたが欠場しているlber.hldap.hです。これは、紛失または無効なopenldap-develパッケージに対する強力なポインタです。そのパッケージ(またはそれに似たものが*ldap-dev*と一致する)がインストールされていますか?

+0

それでは、ldap-develパッケージをインストールしました。メインコードを新しいコードで更新します –

0

おそらくOpenLDAPとpython-ldapのバージョンが一致していません。まともなバージョンのOpenSSLに対して最新のpython-ldapバージョンをコンパイルしてみてください。例えば。 Debianシステムには、OpenLDAPの古いバージョンがインストールされています。

+0

提案バージョンはありますか?インストールされたのは2.3.43-12.el5_6.7 –

関連する問題