LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-13-2012, 10:31 PM   #1
said76
Member
 
Registered: Aug 2011
Posts: 113

Rep: Reputation: Disabled
cannot find ldap libraries


Hi,

I am struggling to install PHP 5.4.3 with ldap from source on Ubuntu Server 12.04 LTS 32bit.

I keep getting the error when doing ./configure with the message that says "error cannot find ldap libraries in /usr/lib."

here is my ./configure details
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-libxml-dir=/usr/local/lib --with-zlib --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-ldap

I then tried to add /usr to --with-ldap like --with-ldap=/usr or --with-ldap=/usr/lib. I got a similar error message but this time it asks for ldap.h.

I have already installed openldap by running apt-get install slapd ldap-utils.

Any help would be greatly appreciated. Thank you
 
Old 05-14-2012, 12:17 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,393

Rep: Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607
Development packages are required, when you compile from source :
( lib )<name>-dev.

Searching : apt-cache search ldap
Or use the online search http://packages.ubuntu.com/search?su...ywords=libldap

sudo apt-get install libldap2-dev

.
 
Old 05-14-2012, 01:25 AM   #3
said76
Member
 
Registered: Aug 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
Thank you for your reply.

I checked from Ubuntu Software Center that I already had libldap2-dev installed on the system. I also run dpkg -L libldap2-dev and it returns lots of files beginning of /usr. I also found that ldap.h is located at /usr/include/ldap.h. So I wonder where I have missed out on.

Thank you
 
Old 05-14-2012, 02:39 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,393

Rep: Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607
Well, you could run : sudo apt-get build-dep php5
.. ? May be something is missing ?

Overview http://packages.ubuntu.com/source/precise-updates/php5
 
Old 05-14-2012, 03:31 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,393

Rep: Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607Reputation: 3607
OK, there is no libldap* in "/usr/lib/".
It's in /usr/lib/i386-linux-gnu/

This will do for libldap :
./configure --prefix=/usr/local/php --with-ldap=/usr/lib/i386-linux-gnu

Next issue : 'ldap.h' cannot be found in /usr/include/ ...
Bugreport : http://www.mail-archive.com/php-bugs...msg155730.html

.
 
Old 05-14-2012, 09:45 PM   #6
said76
Member
 
Registered: Aug 2011
Posts: 113

Original Poster
Rep: Reputation: Disabled
Thank you for your reply.

Yes, I found the libldap under /usr/lib/i386-linux-gnu and included --with-ldap=/usr/lib/i386-linux-gnu in my ./configure. Still received the error message: Cannot find ldap.h.

I think I can get away without using the ldap with PHP for now.

However, I am encountering another problems after trying to run 'make install'. The message is as follows
Installing PHP SAPI module: apache2handler
/usr/local/apache2/build/instdso.sh SH_LIBTOOL='/usr/local/apache2/build/libtool' libphp5.la /usr/local/apache2/modules
/usr/local/apache2/build/libtool --mode=install cp libphp5.la /usr/local/apache2/modules/
cp .libs/libphp5.so /usr/local/apache2/modules/libphp5.so
cp .libs/libphp5.lai /usr/local/apache2/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /usr/src/php-5.4.3/libs'
chmod 755 /usr/local/apache2/modules/libphp5.so
apxs:Error: Config file /usr/local/apache2/conf/httpd.conf not found.

I changed the httpd.conf from /usr/local/apache2/conf to httpd1.conf because it was trying to overwrite it before and it failed with the error message: dpkg: error processing /usr/src/php-5.4.3/php_5.4.3-1_i386.deb (--install): trying to overwrite '/usr/local/apache2/conf/httpd.conf', which is also in package httpd 2.2.22-1. Errors were encountered while processing: /usr/src/php-5.4.3-1_i386.deb

I wonder if you can help me with this. I don't know why it's trying to overwrite the httpd.conf but that package httpd 2.2.22-1 could be the .deb generated by "checkinstall make install". That's just my guess.

Any help would be appreciated. Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Where can I find the libraries? clau_bolson Mandriva 1 11-08-2005 08:40 PM
cant find these libraries linuxmandrake Linux - Software 2 06-28-2005 03:19 PM
Cannot find qt libraries stevo22 Linux - Software 6 03-03-2004 12:32 PM
cannot find shared libraries??! magicvash Linux - General 4 10-09-2003 02:29 PM
Can't find any libraries..? Halz Linux - Software 1 04-25-2002 06:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:40 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