mysql_query missing during installation

Posted by Arsenal on Server Fault See other posts from Server Fault or by Arsenal
Published on 2010-05-18T08:03:16Z Indexed on 2010/05/18 8:11 UTC
Read the original article Hit count: 279

Filed under:
|
|

Hi, I'm trying to install the pdo_mysql extension...

I managed to install it succesfully, but ever since I upgraded mysql to 5.1.34 (using rpm packages) it seems to have gone down so I tried to reinstall it.

However it seems to crash on ./configure as it gives 'mysql_query not found' error:

configure:3961: checking for mysql_query in -lmysqlclient
configure:3991: gcc -o conftest -g -O2 -I/usr/local/include/php -Wl,-    rpath,/usr/lib/mysql -L/usr/lib/mysql  -lmysqlclient -lz -lcrypt -lnsl -lm -lmygcc     conftest.c -lmysqlclient   -rdynamic -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -    lmygcc >&5
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.a when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/3.4.6/../../../libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/libmysqlclient.so when searching for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
configure:3997: $? = 1
configure: failed program was:
| /* confdefs.h.  */ ...

In that file there seems to be a mysql_query(); statement.

I'm pretty sure mysql_query works however since all of my websites are running normally. However the current setup is a mess (previous students kind of messed it up) and there are a whole lot of libmysqclient's in /etc:

libmysqlclient.so.10.0.0
libmysqlclient.so.12.0.0
libmysqlclient.so.14.0.0
libmysqlclient.so.15.0.0
libmysqlclient.so.16.0.0
libmysqlclient_r.so.10.0.0
libmysqlclient_r.so.12.0.0
libmysqlclient_r.so.14.0.0
libmysqlclient_r.so.15.0.0
libmysqlclient_r.so.16.0.0

And just as much symlinks.

Does anyone know how to get this right?

Many thanks!

(oh, and no pecl install pdo_mysql doesn't get me any further). I'm runnnig CentOS 4 with php 5.2.9 compiled from source and MySQL 5.1.34

© Server Fault or respective owner

Related posts about linux

Related posts about mysql