解决configure: error: wrong mysql library version or lib not found

上次在编译phpmysqli的支持的时候出现了如下错误:
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.

经过大量测试, 发现解决方案:
(php-xxxxx为php文件名,代表路径)
# cd /usr/local/src/php-xxxxx/ext/mysqli
# yum -y install mysql-devel
#/phpize
# ./configure --with-php-config=/php-config --enable-embedded-mysqli=shared --enable-shared
# make
# make install
这时屏幕会打印mysqli.so生成的路径, 在php.ini里加载就好啦


欢迎转载本文,请注明来自:http://www.linuxsense.org

TAG: mysqli
发布: 2008-7-09 04:16    作者: hao32    来源: 本站原创    查看: 36次

推荐给好友 上一篇 | 下一篇

 

评分:0

我来说两句

seccode