Trying to ./configure php, getting ldap library error

I’m trying to ./configure PHP 5.6.11 on Debian 8.1. It gets to this line and stops:

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

I can’t figure out what ldap it’s looking for. I don’t know if this is helpful (and I’m not sure exactly what the output means):

dpkg -l *ldap* Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-=====================-===============-===============-=============================================== un dovecot-ldap <none> <none> (no description available) un ldap-server <none> <none> (no description available) un ldap-utils <none> <none> (no description available) un libapache2-mod-ldap-u <none> <none> (no description available) un libapache2-mod-vhost- <none> <none> (no description available) ii libaprutil1-ldap:amd6 1.5.4-1 amd64 Apache Portable Runtime Utility Library - LDAP ii libkldap4 4:4.14.2-2+b1 amd64 library for accessing LDAP un libldap-2.3-0 <none> <none> (no description available) ii libldap-2.4-2:amd64 2.4.40+dfsg-1 amd64 OpenLDAP libraries un libldap-dev <none> <none> (no description available) un libldap2 <none> <none> (no description available) ii libldap2-dev:amd64 2.4.40+dfsg-1 amd64 OpenLDAP development libraries un libnet-ldap-perl <none> <none> (no description available) un libopenldap-dev <none> <none> (no description available) un libsasl2-modules-ldap <none> <none> (no description available) ii php5-ldap 5.6.9+dfsg-0+de amd64 LDAP module for php5 un sudo-ldap <none> <none> (no description available) un umich-ldapd <none> <none> (no description available)

here is the ./configure code:

./configure
--with-apxs2=/usr/local/apache2/bin/apxs
--with-mysql
--with-pdo-mysql=mysqlnd
--with-openssl
--with-gd
--with-zlib
--enable-shmop
--enable-sockets
--enable-sysvsem
--enable-sysvshm
--enable-mbstring
--with-iconv
--with-litespeed
--with-ldap
--with-mcrypt
--enable-gd-native-ttf
--with-png
--with-ttf
--with-freetype-dir=/usr/local/lib/
--enable-calendar
--enable-zip

On the --with-ldap, I’ve tried:

--with-ldap --with-ldap=/usr --with-ldap=/usr/bin --with-ldap=/usr/include --with-ldap=/usr/lib

I am not familiar with Debian, but, a quick search for you found this info…

Debian is a variation of Linux. It uses a lot of “free” libraries to fill in the missing things.
LDAP is one of them. You have to install the LDAP libraries before installing the PHP libraries.
“OpenLdap” is the one that everyone seems to point to. There are others, but, this is the one that
I found on sites where they used Debian. You can download it for free here:

http://www.openldap.org/software/download/

Then, reinstall your PHP… Hope that helps…

I tried installing openldap, but it required installing something called “berkeleydb”. I tried installing 4 different versions of berkeleydb but openldap refused to recognize any of them, so I have no idea how to install openldap. Any suggestions?

Okay, let’s go back to the basics first. What do you need LDAP in the first place?
It basically is used to pull out directory list info on servers and allows you to pull contact
info and other directory type of items, but, from what I understand it is seldom used with the
advent of the ease of use of MySQLi databases and PHP. Since I did not really understand why
anyone would use it I looked into what it is used for nowadays. Most users use it for searching
directories such as a directory of emails for something that is needed. But, most people use more
up to date search systems for those. So, back to your needs. What are you attempting to use LDAP
for on your server?

Apache has written their own version of LDAP which they call Studio or something. It might be a better
solution depending, again, on what you are attempting to do… Here is a link to it. It will run on a
Linux server, so, it should run on your Debian version. Might work out for you… Apapche makes solid
software. http://directory.apache.org/studio/

Next, the error with the DB system, “berkeleydbf” is a common one. Since the OpenLDAP uses their own
DB system, they use the open source Berkeley version. It appears that when you install that system,
you have to export the links to it so that OpenLDAP “sees” it. You are supposed to do that with this
command on your Linux Command Panel:

export LD_LIBRARY_PATH="/root/db-6.0.20/build_unix/.libs"

The path much match your version of the BerkeleyDBF system, in this sample it is 6.0.20…
Hope that helps…

Oh, I was curious and looked a bit further for you. I found that is it just a path issues pointing to the
Berkeley DBF system. Here is a nice informational page I found on the actual Linux forum or questions
site this explaination. They were helping another person that has that same issue. They explain it
and it might help you…
http://www.linuxquestions.org/questions/linux-newbie-8/install-openldap-berkley-version-errors-920859/

Sponsor our Newsletter | Privacy Policy | Terms of Service