PHP
·
发表于 5年以前
·
阅读量:8298
½ñÌiÔÚ64λRed Hat Enterprise Linux AS release 4 .7ÉϱaÒePHP5.2.6³o´i,mysqlÊÇʹÓõÄRPM*½Ê½°²×°µÄ,PHP±aÒe´uÂeÈçÏÂ:
./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 --with-iconv --enable-mbstring --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --enable-sysvsem³oÏÖÒÔÏ´iÎo:checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
ͨ¹ý²eÕÒlibmysqlclient,*¢ÏÖÊÇÔÚ/usr/lib64/mysql/Ŀ¼ÄÚµÄlibmysqlclient.so.16.0.0×oµÄÈiÁ¬½Ó,PHPĬÈÏÊÇÈ¥µÄ /usr/lib/ËÑË÷,ËuÒÔûÓÐÕÒµ½.ÕÒµ½ÎÊÌaÁ˾ͺýa¾oÁË.
ÀaËƵÄÎÊÌa»¹ÓУº
/usr/lib/libjpeg.so -> /usr/lib64/libjpeg.so
½a¾o½¨£º
cp -rp /usr/lib64/mysql/libmysqlclient.so.16.0.0 /usr/lib/libmysqlclient.so
/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
¾¹ý²aÊÔºo, ¢ÏÖÈçϽa¾o½°¸:
(php-xxxxxΪphpÎļþÃu, ´u±iÂ*¾¶)
# cd /usr/local/src/php-xxxxx/ext/mysqli
# yum -y install mysql-devel
# /phpize
# ./configure ¨Cwith-php-config= /php-config ¨Cenable-embedded-mysqli=shared ¨Cenable-shared
# make
# make install
ÕaʱÆÁÄ»»a´oÓ¡mysqli.soÉu³ÉµÄÂ*¾¶, ÔÚphp.iniÀi¼ÓÔؾͺÃÀ²
/usr/bin/ld: cannot find -lmysqlclient