我在Linux Mint上 – 我无法使用LDAP支持编译php
配置说:
checking for LDAP Cyrus SASL support... yes
configure: error: Cannot find ldap libraries in /usr/lib.
但似乎安装了每个-dev库:
dpkg -l *ldap* | grep ii
ii ldap-utils 2.4.28-1.1ubuntu4.1 OpenLDAP utilities
ii ldaptor-utils 0.0.43+debian1-6ubuntu1 command-line LDAP utilities
ii libaprutil1-ldap 1.3.12+dfsg-3 Apache Portable Runtime Utility Library - LDAP Driver
ii libkldap4 4:4.8.5-0ubuntu0.1 library for accessing LDAP
ii libldap-2.4-2 2.4.28-1.1ubuntu4.1 OpenLDAP libraries
ii libldap2-dev 2.4.28-1.1ubuntu4.1 OpenLDAP development libraries
ii libnet-ldap-perl 1:0.4300-2ubuntu1 client interface to LDAP servers
ii libsasl2-modules-ldap 2.1.25.dfsg1-3ubuntu0.1 Cyrus SASL - pluggable authentication modules (LDAP)
ii php5-ldap 5.3.10-1ubuntu3.4 LDAP module for php5
ii python-ldaptor 0.0.43+debian1-6ubuntu1 pure-Python library for LDAP operations
这不是第一次打破,每次都有一些新的奇怪位置的libs或一些新的特殊包装,或者其他什么……你们有没有发现这个时间?这是php 5.4.7.
谢谢,
解决方法:
信不信由你,配置无法找到/usr/lib / i386-linux-gnu下的ldap.so
所以我做了这些链接:( liblber是libldap的朋友)
cd /usr/lib
ln -s i386-linux-gnu/libldap.so
ln -s i386-linux-gnu/liblber.so
并配置成功.坏事是’make’不起作用,因为:
/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_strdup@@OPENLDAP_2.4_2'
/usr/bin/ld: note: 'ber_strdup@@OPENLDAP_2.4_2' is defined in DSO /usr/lib/i386-linux-gnu/liblber-2.4.so.2 so try adding it to the linker command line
/usr/lib/i386-linux-gnu/liblber-2.4.so.2: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] Erreur 1
它似乎是PHP中的一个错误 – 我已经看到过其他一些类似PHP开发人员修复过的错误.
标签:php,ldap,mint
来源: https://codeday.me/bug/20190620/1247660.html