configure: error: Cannot find ldap libraries in /usr/lib

Configuring PHP 5.25 with ./configure --with-mysql=/opt --without-sqlite --with-_lib=lib64 --libdir=/usr/lib64 --with-apxs2=/usr/sbin/apxs --with-zlib --with-ldap=/usr --with-gd --with-jpeg-dir=../jpeg-6b --with-png-dir=/opt --with-iconv-dir --enable-mbstring is chugs away until...

checking for ANSI C header files... (cached) yes
checking for LDAP support... yes
checking for LDAP Cyrus SASL support... no
configure: error: Cannot find ldap libraries in /usr/lib.

I have made a symbolic link in /usr/lib - libldap.a -> /usr/lib64/libldap.a
but this does not help.

Any assistance cheerfully received.

PHP 5.3 --with-ldap configure fails "Cannot find ldap"

gsi66's picture

I am having the problem too. Seems to be looking in /usr/lib instead of /usr/lib64. Probably some compiler directive to be added to Makefile, maybe "-L/usr/lib64". Not sure, as this dir is being used by other parts of the php configure.

64-bit

paul.bohme's picture

Judging by the /usr/lib64, am going to guess you're running a 64-bit distro. Chances are good that symlinking a 32-bit library into the 64-bit path will do more harm than good. I'd start by looking for a proper 64-bit build of LDAP.

Geek Guide
The DevOps Toolbox

Tools and Technologies for Scale and Reliability
by Linux Journal Editor Bill Childers

Get your free copy today

Sponsored by IBM

Upcoming Webinar
8 Signs You're Beyond Cron

Scheduling Crontabs With an Enterprise Scheduler
11am CDT, April 29th
Moderated by Linux Journal Contributor Mike Diehl

Sign up now

Sponsored by Skybot