Compile php with ldap

I'm on Linux Mint - I can't compile php with LDAP support

Tune:

checking for LDAP Cyrus SASL support... yes configure: error: Cannot find ldap libraries in /usr/lib. 

But each -dev libs seems to be installed:

  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 

This is not the first time it breaks, each time with some kind of new strange location for libs or some new special packages or something else ... Have any of you found out during this time? This is php 5.4.7.

Thanks,

+4
source share
1 answer

Believe it or not, configure does not find ldap.so which is under / usr / lib / i 386-linux-gnu

So I made these links: (liblber is a friend of libldap)

 cd /usr/lib ln -s i386-linux-gnu/libldap.so ln -s i386-linux-gnu/liblber.so 

And configure success. The bad thing is that “make” does not work because:

 /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 

It seems that the error is in PHP - I saw some others, similar to those that were fixed by PHP developers in the past.

+5
source

Source: https://habr.com/ru/post/1437143/


All Articles