So I wasn't sure if this question would go best here or on Overflow or Server Fault, but decided to try here first. I'm installing LAMP on a VPS, and am running into issues configuring and building PHP. I've got MySQL installed, and it seems to be running fine. I'm trying to just go for a basic install of PHP with MySQL support as instructions are given here:
http://www.php.net/manual/en/install.unix.apache2.php
Here's the configure command I was running:
./configure –with-apxs2=/usr/local/apache2/bin/apxs –with-mysql
I was getting this error:
configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore!
I just had a basic, default MySQL install with yum install mysql-server mysql.
After some Googling, I installed mysql-devel to get rid of that error:
yum install mysql-devel
Then I started getting this error:
configure: error: Try adding –with-zlib-dir=<DIR>. Please check config.log for more information.
Okay. So I changed my command to:
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-zlib
Now I just get this:
configure: error: mysql configure failed. Please check config.log for more information.
Honestly kind of lost at this point. I'm looking at the config.log, but not exactly sure what I need to be looking for. Here's the sections I think may be relevant:
configure:60061: gcc -o conftest -I/usr/include -g -O2 -fvisibility=hidden-Wl,-rpath,/usr/lib/mysql -L/usr/lib/mysql -L/usr/lib conftest.c -lmysqlclient -lz -lrt -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm 1>&5
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure: failed program was:
#line 60050 "configure"
#include "confdefs.h"
Any thoughts? Or should I be looking at something else in config.log?