Trying to ./configure php, getting ldap library error
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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:
Code:
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):
Code:
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-utils <none> <none> (no description available)
un libapache2-mod-ldap-us <none> <none> (no description available)
un libapache2-mod-vhost-l <none> <none> (no description available)
un libaprutil1-ldap <none> <none> (no description available)
un libldap-2.3-0 <none> <none> (no description available)
ii libldap-2.4-2:amd64 2.4.40+dfsg-1 amd64 OpenLDAP libraries
ii libldap-2.4-2-dbg:amd6 2.4.40+dfsg-1 amd64 Debugging information for 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)
rc php5-ldap 5.6.9+dfsg-0+deb amd64 LDAP module for php5
un sudo-ldap <none> <none> (no description available)
xyz@comp:/usr# apt-get install libopenldap-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libopenldap-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
libldap2-dev
E: Package 'libopenldap-dev' has no installation candidate
Code:
xyz@comp:/usr# apt-get install libldap-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libldap2-dev' instead of 'libldap-dev'
libldap2-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Code:
xyz@comp:/usr# apt-get install libldap2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libldap2-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Apparently these don't exist or I have the latest version. I'm not sure what to do now.
aren't those modules, that have to be installed seperately?
they are rather common requirements for e.g. various cms's, and i always solved it by installing the according php5-* module and restarting apache2.
i still don't see any reason to compile php from scratch.
what sort of server os are you running, and what are you trying to achieve with your server?
fwiw, on a simple debian stable home server (lists installed php packages):
Code:
$ dpkg-query -l 'php5*'
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
+++-==============-============-============-=================================
ii php5 5.6.9+dfsg-0 all server-side, HTML-embedded script
un php5-cgi <none> <none> (no description available)
ii php5-cli 5.6.9+dfsg-0 i386 command-line interpreter for the
ii php5-common 5.6.9+dfsg-0 i386 Common files for packages built f
ii php5-curl 5.6.9+dfsg-0 i386 CURL module for php5
un php5-dev <none> <none> (no description available)
un php5-fpm <none> <none> (no description available)
ii php5-gd 5.6.9+dfsg-0 i386 GD module for php5
ii php5-json 1.3.6-1 i386 JSON module for php5
ii php5-mcrypt 5.6.9+dfsg-0 i386 MCrypt module for php5
un php5-mhash <none> <none> (no description available)
ii php5-mysql 5.6.9+dfsg-0 i386 MySQL module for php5
un php5-mysqli <none> <none> (no description available)
un php5-mysqlnd <none> <none> (no description available)
ii php5-readline 5.6.9+dfsg-0 i386 Readline module for php5
un php5-suhosin <none> <none> (no description available)
un php5-user-cach <none> <none> (no description available)
un php5-xcache <none> <none> (no description available)
un php5-xdebug <none> <none> (no description available)
When you configure it checks that the correct version of the library is there. And in your case, its not.
Since you are compiling your own version of PHP, its pretty safe to say that your distro probably did not compile the correct version of the library and that your PHP version most likely need a newer version.
What system are you running? 64bit or 32bit? And is the software 64bit? If you are on 64bit and running 32bit software, you need to install the 32bit libs.
You should probably just compile and build the library yourself and not using the package manager.
Perhaps you need to symlink the correct lib file to the name of the file which your configure script is looking for.
Other than that, I am not sure. I have not used debian that much, but I can also remember having had some similar issues before, but a long time ago now.
Not sure about PHP package exactly, but if its the opposite way and you need the older ldap lib, then it could be you can just symlink the "name" of the lib to the newer version.
so that is probably the reason why you want to compile your own.
but,
i'm still sticking to my conservative views:
- there's a reason why debian stable is at 5.6.9 atm, and you will have a hard time getting a higher version. there's some backporting for jessie, but you might be easier off just changing to debian testing (but losing stability).
- again, why do you think you need this higher version? maybe there's an easier approach.
so that is probably the reason why you want to compile your own.
but,
i'm still sticking to my conservative views:
- there's a reason why debian stable is at 5.6.9 atm, and you will have a hard time getting a higher version. there's some backporting for jessie, but you might be easier off just changing to debian testing (but losing stability).
- again, why do you think you need this higher version? maybe there's an easier approach.
Because I need these features:
ldap
pdo
gd
zip
and as far as I know, they can only be added at compile.
who or what exactly "needs" these features, and how do you think you know that (link to documentation)?
as i wrote before, this looks very much like system requirements for some CMS.
i am not good with those things, but i recently tried literally dozens of them, and not once have i come across one that would not run on debian stable with aforementioned php version.
i did have to install some extra modules (as i also mentioned before).
Have you tried that instead?
They are for our intranet site that I created. It uses LDAP for authentication, gd for images, PDO for communication with MySQL, and zip for PHPExcel. So I know what the site needs.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.