I was trying to build PHP 5.2.17
from source on Ubuntu 12.4 64bit
using this configuration:
./configure --prefix=/opt/php5.2 --with-config-file-path=/opt/php5.2 --with-mysql
but I keep getting this error:
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
Any Idea how to resolve this?
EDIT1: I minimized the configure command so it just focuses to mysql. also I'm running a 64bit version of ubuntu.
EDIT2: tried running ldconfig -v |grep mysql
and here is the output
# ldconfig -v |grep mysql
/sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu' given more than once
/sbin/ldconfig.real: Cannot stat /usr/lib/x86_64-linux-gnu/libnss_db.so: No such file or directory
libmysqlclient.so.18 -> libmysqlclient_r.so.18.0.0
libmysqlpp.so.3 -> libmysqlpp.so.3.1.0
Thanx @hakre for the assistance. here is the command I used and it works:
sudo ./configure --prefix=/opt/php5.2 --with-config-file-path=/opt/php5.2 --with-mysql --with-libdir=/lib/x86_64-linux-gnu
Maybe for some poor soul this will work:
./configure --with-apxs2=/usr/sbin/apxs --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With