打印

debian 8 安装 php-ldap 失败

debian 8 安装 php-ldap 失败

军哥:
服务器是 Debian 8.0lnmp1.3-full
按照此方法安装:
https://www.vpser.net/manage/lnmp-php-install-ext.html

执行到 ./configure --with-php-config=/usr/local/php/bin/php-config


提示找不到ldap.h 文件
网上down的教程也没有成功
(debian下找不到openldap openldap-dev,尝试安装了libldap2-dev,也没有成功)
不知道该怎么弄了

TOP

安装ldap应该还需要加上 --with-ldap 参数,http://php.net/manual/en/ldap.installation.php

find / -name ldap.h 看一下

Paypal信用卡代付/代购VPS/域名/软件/付费代维问题解决等 QQ 503228080 旺旺 lzhenbao
军哥淘宝店铺
QQ/旺旺仅提供代购及付费代维/问题解决等服务,其他不回复!LNMP相关问题请在本论坛发帖,提问前先搜索,按https://bbs.vpser.net/thread-2555-1-1.html 反馈信息!

TOP

回复 2# 的帖子

军哥我是这样操作的
执行 ./configure --with-php-config=/usr/local/php/bin/php-config --with-ldap
提示 未找到ldap.h
执行 find / -name ldap.h
显示在 /usr/include/ldap.h
在执行 ./configure --with-php-config=/usr/local/php/bin/php-config --with-ldap=/usr/include
提示 未找到 ldap libraries in /usr/includ
已安装libldap2-dev

TOP

回复 3# 的帖子

你别发你自己翻译后的编译错误信息,发报错的原版错误信息

如果是提示 ldap libraries in 的话那就不是ldap.h了,那就是 libldap 了

Paypal信用卡代付/代购VPS/域名/软件/付费代维问题解决等 QQ 503228080 旺旺 lzhenbao
军哥淘宝店铺
QQ/旺旺仅提供代购及付费代维/问题解决等服务,其他不回复!LNMP相关问题请在本论坛发帖,提问前先搜索,按https://bbs.vpser.net/thread-2555-1-1.html 反馈信息!

TOP

回复 4# 的帖子

军哥,你看一下
root@debian:/mnt/lnmp1.3-full/src/php-5.5.36/ext/ldap# /usr/local/php/bin/phpize
Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212
root@debian:/mnt/lnmp1.3-full/src/php-5.5.36/ext/ldap# ./configure --with-php-config=/usr/local/php/bin/php-config --with-ldap
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local/php
checking for PHP includes... -I/usr/local/php/include/php -I/usr/local/php/include/php/main -I/usr/local/php/include/php/TSRM -I/usr/local/php/include/php/Zend -I/usr/local/php/include/php/ext -I/usr/local/php/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/php/lib/php/extensions/no-debug-non-zts-20121212
checking for PHP installed headers prefix... /usr/local/php/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... re2c
checking for re2c version... 0.13.5 (ok)
checking for gawk... gawk
checking for LDAP support... yes, shared
checking for LDAP Cyrus SASL support... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of long int... 8
checking for ANSI C header files... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/stat.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for memory.h... (cached) yes
checking for strings.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for unistd.h... (cached) yes
configure: error: Cannot find ldap libraries in /usr/lib.

TOP

回复 5# 的帖子

ln -sf /usr/lib/x86_64-linux-gnu/libldap.* /usr/lib/

Paypal信用卡代付/代购VPS/域名/软件/付费代维问题解决等 QQ 503228080 旺旺 lzhenbao
军哥淘宝店铺
QQ/旺旺仅提供代购及付费代维/问题解决等服务,其他不回复!LNMP相关问题请在本论坛发帖,提问前先搜索,按https://bbs.vpser.net/thread-2555-1-1.html 反馈信息!

TOP

回复 6# 的帖子

军哥谢谢了,安装成功了

TOP