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

上次在编译php对mysqli的支持的时候出现了如下错误:
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里加载就好啦

2008年7月9日 | 归档于 web构架
标签:
  1. lee
    2011年4月2日 11:44 | #1

    我和你遇到了同样的问题。
    但是请问 第三条语句的 #/phpize 是什么意思。

    出现这种问题的原因是什么?

发表评论

XHTML: 您可以使用这些标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>