VPS侦探论坛

 找回密码
 注册
查看: 3888|回复: 6

debian 8 安装 php-ldap 失败

[复制链接]
发表于 2017-5-19 16:19:48 | 显示全部楼层 |阅读模式

军哥:
服务器是 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,也没有成功)
不知道该怎么弄了
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-5-19 19:27:16 | 显示全部楼层


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

find / -name ldap.h 看一下
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-5-20 11:13:39 | 显示全部楼层

回复 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
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2017-5-20 11:48:29 | 显示全部楼层

回复 3# 的帖子




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

如果是提示 ldap libraries in 的话那就不是ldap.h了,那就是 libldap 了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2017-5-20 19:06:10 | 显示全部楼层

回复 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.

军哥运维代购:http://shop63846532.taobao.com/

发表于 2017-5-20 19:24:19 | 显示全部楼层

回复 5# 的帖子


ln -sf /usr/lib/x86_64-linux-gnu/libldap.* /usr/lib/
 楼主| 发表于 2017-5-22 10:00:18 | 显示全部楼层

回复 6# 的帖子


军哥谢谢了,安装成功了
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-26 05:23 , Processed in 0.028554 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表