±àÒëPHP±¨´íconfigure error Cannot find libmysqlclient under usrµÄ½â¾ö·½·¨

5年以前  |  阅读数:510 次  |  编程语言:PHP 

½ñÌ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
 相关文章:
PHP分页显示制作详细讲解
SSH 登录失败:Host key verification failed
获取IMSI
将二进制数据转为16进制以便显示
获取IMEI
文件下载
贪吃蛇
双位运算符
PHP自定义函数获取搜索引擎来源关键字的方法
Java生成UUID
发送邮件
年的日历图
提取后缀名
在Zeus Web Server中安装PHP语言支持
让你成为最历害的git提交人
Yii2汉字转拼音类的实例代码
再谈PHP中单双引号的区别详解
指定应用ID以获取对应的应用名称
Python 2与Python 3版本和编码的对比
php封装的page分页类完整实例