PHPconfiguration不findLDAP头库

我安装了LDAP开发标题:

apt-get install libldb-dev

这添加了几个ldap头文件:

 root@crunchbang:/usr/include# ls -la ldap* -rw-r--r-- 1 root root 9466 Apr 23 2013 ldap_cdefs.h -rw-r--r-- 1 root root 1814 Apr 23 2013 ldap_features.h -rw-r--r-- 1 root root 65213 Apr 23 2013 ldap.h -rw-r--r-- 1 root root 9450 Apr 23 2013 ldap_schema.h -rw-r--r-- 1 root root 3468 Apr 23 2013 ldap_utf8.h 

当我configuration和引用目录时:

./configure --with-ldap=/usr/include

我得到这个错误:

 ... checking for LDAP support... yes checking for LDAP Cyrus SASL support... no checking size of long int... 4 configure: error: Cannot find ldap libraries in /usr/include. 

我遇到了这个问题,试图获得一个Docker容器中涉及的PHP扩展。 这是我必须做的:

  1. apt-get install libldb-dev libldap2-dev
  2. ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so \ && ln -s /usr/lib/x86_64-linux-gnu/liblber.so /usr/lib/liblber.so

这对我完美的工作。

安装LDAP库:

apt-get install libldb-dev

创buildSO链接器文件:

 updatedb --prunepaths=/mnt cd /usr/lib if [ ! -L liblber-2.4.so.2 ]; then ln -s "$(locate liblber-2.4.so.2)" fi if [ ! -L liblber-2.4.so.2.8.3 ]; then ln -s "$(locate liblber-2.4.so.2.8.3)" fi if [ ! -L liblber.so ]; then ln -s "$(locate liblber.so)" fi if [ ! -L libldap.so ]; then ln -s "$(locate libldap.so)" fi if [ ! -L libldap_r.so ]; then ln -s "$(locate libldap_r.so)" fi 

configurationPHP:

./configure --with-ldap=/usr

PHP版本5.6.20 debian和基于: su aptitude install libldb-dev ln -s /usr/lib/x86_64-linux-gnu/libldap.so /usr/lib/libldap.so然后,尝试编译它

(假设你在Ubuntu上)请尝试configure --with-ldap-libs=/usr/lib/i386-linux-gnu/ 。 如果没有帮助,请详细说明您使用哪个Linux发行版以及您正在构build哪个项目的答案。