2
votes

I am currently setting up a PHP 5.2 server (yes I know, but it is actually needed in this case) but I keep getting an error:

configure: error: Cannot find libmysqlclient under /usr.

The command that I am running is:

./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-libdir

I have installed libmysqlclient and when I run

locate libmysqlclient

I get results returned, although none of them are the file libmysqlclient (the closest is libmysqlclient.a)

I would greatly appreciate any help that can be provided.

1
as I recall, the mysql stuff is wonky, and you have to point configure at the parent directory. e.g. if the lib's in /foo/bar/baz/libmysql.so, you have to do --with-mysql=/foo/bar instead. - Marc B
I gave this a shot and no such luck. - inimrepus

1 Answers

4
votes

Try using the DIR directive

--with-mysql --with-libdir=/lib/i386-linux-gnu/

From Cannot find libmysqlclient under /usr. while build PHP 5.2 from source on Ubuntu 12.4

Updated from your comment!