Centos7 下pip安装python-ldap失败问题解决( Modules/common.h:15:18: 致命错误:lber.h:没有那个文件或目录)
报错信息如下:
[root@lms lms]# pip3 install python-ldap ............. -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.4.0 "-DLDAPMODULE_AUTHOR=python-ldap project" "-DLDAPMODULE_LICENSE=Python style" -IMod ules -I/usr/local/python3/include/python3.9 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-cpython-39/Modules/LDAPObject.o In file included from Modules/LDAPObject.c:3:0: Modules/common.h:15:18: 致命错误:lber.h:没有那个文件或目录 #include <lber.h> ^ 编译中断。 error: command '/usr/bin/gcc' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for python-ldap Failed to build python-ldap ERROR: Could not build wheels for python-ldap, which is required to install pyproject.toml-based projects [root@lms lms]#
解决:
[root@lms lms]# yum -y install openldap-devel