LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   php 5.3 - configure: error: wrong mysql library version or lib not found. (http://www.linuxquestions.org/questions/linux-software-2/php-5-3-configure-error-wrong-mysql-library-version-or-lib-not-found-767319/)

kingkashif 11-06-2009 09:30 AM

php 5.3 - configure: error: wrong mysql library version or lib not found.
 
Hello friends,

Well I am trying to compile php 5.3 from sources..

I've met every other required dependencies, but I am getting an error while configuring, which I don't seem to understand well.

I am configuring it using below
Code:

./configure --prefix=/usr --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --enable-mod-charset --with-libxml-dir --with-openssl --with-kerberos --with-pcre-regex --with-zlib --with-bz2 --with-curl --with-dbm --enable-exif --enable-ftp --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-xpm-dir --with-freetype-dir --with-t1lib --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --with-imap-ssl --enable-intl --enable-mbstring --with-mcrypt --with-mssql --with-mysql --with-mysqli --enable-embedded-mysqli --with-apxs2 --with-snmp --enable-zip
The error I am getting is following

Code:

checking whether to enable multibyte regex support... yes
checking whether to check multibyte regex backtrack... yes
checking for external libmbfl... no
checking for external oniguruma... no
checking for variable length prototypes and stdarg.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... yes
checking for unistd.h... (cached) yes
checking for sys/time.h... (cached) yes
checking for sys/times.h... yes
checking for stdarg.h... (cached) yes
checking size of int... (cached) 4
checking size of short... (cached) 2
checking size of long... (cached) 8
checking for working const... yes
checking whether time.h and sys/time.h may both be included... yes
checking for working alloca.h... (cached) yes
checking for alloca... (cached) yes
checking for 8-bit clean memcmp... yes
checking for stdarg.h... (cached) yes
checking for mcrypt support... yes
checking for libmcrypt version... >= 2.5.6
checking for mcrypt_module_open in -lmcrypt... yes
checking for MSSQL support via FreeTDS... yes
checking for dnet_addr in -ldnet_stub... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /var/tmp/mysql.sock
checking for mysql_close in -lmysqlclient... yes
checking for MySQLi support... yes
checking whether to enable embedded MySQLi support... yes
checking for mysql_set_server_option in -lmysqlclient... no
configure: error: wrong mysql library version or lib not found. Check config.log for more information.


I really searched alot but couldn't find anything valuable.

I have following mysql packages installed

Code:

mysql-server-5.0.77-3.el5
mysql-5.0.77-3.el5
perl-DBD-MySQL-3.0007-2.el5
mysql-bench-5.0.77-3.el5
mysql-devel-5.0.77-3.el5


My system is a 64 bit system...

I have libmysqlclient.so in /usr/lib64/mysql/
I also made a symlink of it in /usr/lib64

But still no luck.

Any help will be greatly appreciated .... :)


Thanks

kingkashif 11-06-2009 09:48 AM

ok I got it ..

If you're facing the same error then following is the remedy..

if you're configure with --with-mysqli --enable-embedded-mysqli

then just remove "--enable-embedded_mysqli"


and everything will be fine.

knudfl 11-06-2009 11:02 AM

Well .... building php-5.3 for Fedora Xx and Redhat EL 5
from source, I guess this one will provide all the "tricks" :
(And using an 'src.rpm' is the obvious choice, when available.)

http://download.fedora.redhat.com/pu...6.fc12.src.rpm
> > php-5.3.0-6.fc12.src.rpm
including some patching .. and also supplying all the "70"
configure options, ready to compile.

Ref. http://www.linuxquestions.org/questi...ux-5.0-764323/
post # 3.
.....

GloolsGuan 09-20-2011 03:52 AM

Quote:

Originally Posted by kingkashif (Post 3747141)
ok I got it ..

If you're facing the same error then following is the remedy..

if you're configure with --with-mysqli --enable-embedded-mysqli

then just remove "--enable-embedded_mysqli"


and everything will be fine.


Thanks man, thanks very much, My problem has been solved. :)


All times are GMT -5. The time now is 10:00 AM.