Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to compile php5 on dreamhost, after doing what said, I had compiled all the components except php5 itself. When running

$ ./configure ${PHPFEATURES}

It reported error

configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!

But actually I find that /usr/lib64/lib64/ exists. How to help configure find it? Many thanks.

share|improve this question

closed as off-topic by Michael Hampton Apr 8 '15 at 15:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions should demonstrate reasonable business information technology management practices. Questions that relate to unsupported hardware or software platforms or unmaintained environments may not be suitable for Server Fault - see the help center." – Michael Hampton
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 2 down vote accepted

you could try give different path for mysql, ie:



share|improve this answer
I have modified the line to --with-mysql=/usr/lib64, but the error still exists, and it still tries to find the file under /usr not /usr/lib64 – ZelluX Sep 25 '09 at 11:30

The MysqL installation includes a script called mysql_config, best is to point the compiler flags to this so the build system uses the compiler/linker flags provided by the installation.


When using PHP 5.3 you could also use "myslqnd" as a path which would enable the "MySQL native driver" which is a PHP-specific replacement for the MySQL Client library and is independent from any libmysql.

share|improve this answer

Maybe for some poor soul this will work:

./configure --with-apxs2=/usr/sbin/apxs --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.