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.

Free Dummies Books
Continuous Engineering

Learn:

  • What continuous engineering is
  • How to continuously improve complex product designs
  • How to anticipate and respond to markets and clients
  • How to get the most out of your engineering resources

Get your free book now

Sponsored by IBM

Free Dummies Books
Service Virtualization

Learn to:

  • Define service virtualization
  • Select the most beneficial services to virtualize
  • Improve your traditional approach to testing
  • Deliver higher-quality software faster

Get your free book now

Sponsored by IBM