Today in the 64-bit red Hat Enterprise Linux as Release 4.7 Compile PHP5.2.6 error, MySQL is used by the RPM method installed, PHP compiled code as follows:
./configure--prefix=/usr/local/php--with-mysql--with-apxs2=/usr/local/apache/bin/apxs--with-openssl--with-curl --enable-xml--with-mcrypt--with-ttf--enable-magic-quotes--enable-fastcgi--enable-mbstring-- Enable-mbstring--with-gd--with-jpeg-dir--with-png-dir--with-zlib-dir--enable-sysvsem The following error occurred: Checking for Specified location of the MySQL UNIX socket ... no checking for
mysql UNIX socket location ... no
configure:error: Cannot find Libmysqlclient under/usr.
The MySQL client library is not bundled anymore!
By looking for libmysqlclient, found to be a soft connection made in the/usr/lib64/mysql/directory libmysqlclient.so.16.0.0, PHP defaults to go to the/usr/lib/search, So I didn't find it. We found the problem and we solved it.
Similar questions are:
/usr/lib/libjpeg.so->/usr/lib64/libjpeg.so
Workaround:
1.
Cp-rp/usr/lib64/mysql/libmysqlclient.so.16.0.0/usr/lib/libmysqlclient.so
2.
/usr/lib64/libmysqlclient.so-> libmysqlclient.so.16.0.0/usr/lib/libmysqlclient.so->/usr/lib64/ libmysqlclient.so
checking whether to enable embedded mysqli support ... no 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
After testing, we found the following solutions:
(Php-xxxxx is the PHP filename, representing the path)
# cd/usr/local/src/php-xxxxx/ext/mysqli #
yum-y install mysql-devel
#/phpize
with-php-config=/php-config–enable-embedded-mysqli=shared–enable-shared
# make
Install
The screen will print mysqli.so generated path, in php.ini Riga
/usr/bin/ld:cannot find-lmysqlclient