LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 07-27-2015, 01:32 PM   #1
raphael75
Member
 
Registered: Jul 2012
Posts: 40

Rep: Reputation: Disabled
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)
here is the ./configure code:

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
Please help, thanks!
 
Old 07-27-2015, 08:24 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Reinstall libopenldap-dev and/or libldap-dev, probably
 
Old 07-28-2015, 01:41 PM   #3
raphael75
Member
 
Registered: Jul 2012
Posts: 40

Original Poster
Rep: Reputation: Disabled
I tried this:
Code:
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.
 
Old 07-29-2015, 02:56 PM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
do you want to compile php from source?
why?
why not just install it from the repos?
Code:
$ sudo -i
# apt-get update
# apt-get upgrade
# apt-get install php5
 
Old 07-30-2015, 06:32 AM   #5
raphael75
Member
 
Registered: Jul 2012
Posts: 40

Original Poster
Rep: Reputation: Disabled
Because we need several compile options that I don't think come with the repository version - ldap, pdo, gd, zip.

Are those in the repository version?
 
Old 07-31-2015, 07:03 AM   #6
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
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)
you can also try the
Code:
<?php phpinfo();
function to see what you have.

Last edited by ondoho; 07-31-2015 at 07:05 AM.
 
Old 07-31-2015, 07:55 AM   #7
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,834
Blog Entries: 17

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
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.
 
Old 08-01-2015, 06:35 AM   #8
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by raphael75 View Post
I'm trying to ./configure PHP 5.6.11 on Debian 8.1.
i missed this line.

on my debian stable it's:
Code:
$ php --version
PHP 5.6.9-0+deb8u1 (cli) (built: Jun  5 2015 11:47:09)
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.
 
Old 08-02-2015, 02:33 PM   #9
raphael75
Member
 
Registered: Jul 2012
Posts: 40

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ondoho View Post
i missed this line.

on my debian stable it's:
Code:
$ php --version
PHP 5.6.9-0+deb8u1 (cli) (built: Jun  5 2015 11:47:09)
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.

Is it possible to add them after compiling?

Do they come with the apt-get version?
 
Old 08-03-2015, 06:09 AM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by raphael75 View Post
Because I need these features:
ldap
pdo
gd
zip
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?
 
Old 08-03-2015, 07:15 AM   #11
raphael75
Member
 
Registered: Jul 2012
Posts: 40

Original Poster
Rep: Reputation: Disabled
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.
 
Old 08-03-2015, 12:44 PM   #12
raphael75
Member
 
Registered: Jul 2012
Posts: 40

Original Poster
Rep: Reputation: Disabled
I tried the apt-get version of PHP5 (5.6.9). Turns out it does include those features, so it should be good, even though it's a few revisions behind.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
configure PHP with LDAP server said76 Linux - Server 3 04-02-2014 12:46 AM
CentOS - Compile mutt error: configure: error: no curses library found SEI Linux - Newbie 2 01-28-2014 09:23 AM
PHP 5.4 configure error: wrong mysql library version or lib not found stephenb Linux - Server 2 03-27-2013 08:38 AM
[SOLVED] php 5.3 - configure: error: wrong mysql library version or lib not found. kingkashif Linux - Software 3 09-20-2011 03:52 AM
configure: error: Qt (>= Qt 3.3 and < 4.0) (library qt-mt) not found jaygee02 Linux - Software 2 04-30-2006 11:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration