./config can't find mysql client library

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
moonlightcheese
Forum Newbie
Posts: 5
Joined: Thu Aug 23, 2007 8:05 am

./config can't find mysql client library

Post by moonlightcheese »

aright so a lot has changed since i last compiled a LAMP server from source and since Ubuntu 7 has screwed up the PHP5 package, this is my only option. i've never had this much trouble compiling PHP before. nowadays apparently PHP is no longer allowed to package a client library in the installation, and i cannot seem to get the config script to recognize the library i have installed.
checking for MySQL UNIX socket location... /tmp/mysql.sock
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
why is it looking under 'yes'? the library does exist in /usr/lib but the configure script just doesn't see it. here's a print of my ld.so.conf file:

Code: Select all

include /etc/ld.so.conf.d/*.conf
/usr/lib
the first line was placed there by Ubuntu. after running ldconfig, and apachectl restart, nothing changed. i've tried adding the /usr/lib line to the /etc/ld.so.conf.d/i486-gnu-linux file as well:

Code: Select all

# Multiarch support
/lib/i486-linux-gnu
/usr/lib/i486-linux-gnu
/usr/lib
nothing is working! why couldn't they just add the option to the configure script? a --with-mysql-lib='/path/to/lib' would have been nice. how do i solve this?
User avatar
CoderGoblin
DevNet Resident
Posts: 1425
Joined: Tue Mar 16, 2004 10:03 am
Location: Aachen, Germany

Re: ./config can't find mysql client library

Post by CoderGoblin »

moonlightcheese wrote:aright so a lot has changed since i last compiled a LAMP server from source and since Ubuntu 7 has screwed up the PHP5 package
How did you install it ? How did it screw it up ?

To me the most obvious solution would be to work out what went wrong here rather than try to compile PHP from source.
Steve Mellor
Forum Commoner
Posts: 49
Joined: Thu Aug 02, 2007 8:18 am

Post by Steve Mellor »

Does

Code: Select all

./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config
help at all? Or at least point you in the right direction?

That's how I solved my problem when I last installed a LAMP server from scratch.
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Re: ./config can't find mysql client library

Post by jason »

moonlightcheese wrote:aright so a lot has changed since i last compiled a LAMP server from source and since Ubuntu 7 has screwed up the PHP5 package, this is my only option. i've never had this much trouble compiling PHP before. nowadays apparently PHP is no longer allowed to package a client library in the installation, and i cannot seem to get the config script to recognize the library i have installed.
checking for MySQL UNIX socket location... /tmp/mysql.sock
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
why is it looking under 'yes'?

Did you do:

Code: Select all

./configure --with-mysql=yes
?

:D
moonlightcheese
Forum Newbie
Posts: 5
Joined: Thu Aug 23, 2007 8:05 am

Post by moonlightcheese »

Steve Mellor wrote:Does

Code: Select all

./configure --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config
help at all? Or at least point you in the right direction?

That's how I solved my problem when I last installed a LAMP server from scratch.
it didn't work. the mysql_config file is there but it's just not working. i uninstalled all of the mysql Ubuntu packages and compiled from source and installed manually. thanks for the quick responses :D

anything else i can try?

and here's the ./configure command i'm using:

Code: Select all

sudo ./configure --with-mysql=/var/run/mysql --with-apxs2=/usr/local/apache2/bin/apxs
moonlightcheese
Forum Newbie
Posts: 5
Joined: Thu Aug 23, 2007 8:05 am

Post by moonlightcheese »

weird... i did:

Code: Select all

sudo ./configure --with-mysql-sock=/var/run/mysql --with-apxs2=/usr/local/apache2/bin/apxs
and apparently it worked by using the --with-mysql-sock command...

i think Ubuntu installs mysql under /var/run and when i recompiled and installed mysql it was placed in /usr/local where it's supposed to be? it's compiling now. i had it compiled before and kept getting this:
Fatal error: Call to undefined function mysql_connect() in /home/jamartin/htdocs/db/mysql.php on line 55
with phpnuke installed (after i took all the @'s out of that confounded mysql.php file). i'm assuming this has to do with the libmysqlclient.so file not being installed by Ubuntu, which is why i uninstalled mysql in the first place. hopefully it will see the lib now.
moonlightcheese
Forum Newbie
Posts: 5
Joined: Thu Aug 23, 2007 8:05 am

Post by moonlightcheese »

ran a 'make test' and i got this:
=====================================================================
TIME END 2007-08-23 11:20:29

=====================================================================
TEST RESULT SUMMARY
---------------------------------------------------------------------
Exts skipped : 57
Exts tested : 22
---------------------------------------------------------------------

Number of tests : 3345 1999
Tests skipped : 1346 ( 40.2%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 5 ( 0.1%) ( 0.3%)
Tests passed : 1994 ( 59.6%) ( 99.7%)
---------------------------------------------------------------------
Time taken : 108 seconds
=====================================================================

=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
double to string conversion tests [Zend/tests/double_to_string.phpt]
Bug #16069 (ICONV transliteration failure) [ext/iconv/tests/bug16069.phpt]
iconv stream filter [ext/iconv/tests/iconv_stream_filter.phpt]
proc_open [ext/standard/tests/general_functions/proc_open02.phpt]
strripos() offset integer overflow [ext/standard/tests/strings/strripos_offset.phpt]
=====================================================================

You may have found a problem in PHP.
We would like to send this report automatically to the
PHP QA team, to give us a better understanding of how
the test cases are doing. If you don't want to send it
immediately, you can choose "s" to save the report to
a file that you can send us later.
Do you want to send this report now? [Yns]:
i also got this when i compiled the first time, but ignored it and ran 'make install' anyway.
Post Reply