原创 安裝 PHP时出现error: Cannot find MySQL header files under yes收藏

新一篇: undefined symbol:_zend_list_delete问题 | 旧一篇: 校内赛

最近选修的Linux课程要上机配置服务器考试,安装mysql、apache都没有什么大问题。

安装 PHP 时,刚执行 ./configure --with-apxs2=/usr/local/Apache2/bin/apxs --with-mysql 就出现以下错误信息:

 ..... checking for mSQL support... no

checking for MSSQL support via FreeTDS.. no

checking for MySQL support... yes

checking for specified location of the MySQL UNIX socket... no

checking for MySQL UNIX socket location... /tmp/mysql.sock

configure: error: Cannot find MySQL header files under yes.

Note that the MySQL client library is not bundled anymore.

 解法:   

如果不知道 header file 在哪,用 「find / -name mysql.h」命令找出其位置;   

如果是自己也有手動安裝 MySQL 套件的話,直接指定該位置。

在 ./configure 下参数指定 header file 的位置(即mysql安装目录),如下:

./configure --with-apxs2=/usr/local/Apache2/bin/apxs --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config

 

希望对你有用!

发表于 @ 2008年05月23日 15:51:00|评论(loading...)|编辑

新一篇: undefined symbol:_zend_list_delete问题 | 旧一篇: 校内赛

评论

#higkoo 发表于2008-09-05 19:32:29  IP: 219.131.196.*
「find / -name mysql.h」命令找出其位置
我是默认安装的cacti,出了一堆错,其中就是楼主这个了。

奇怪的是我用find居然没找到mysql.h。
#cyco008 发表于2008-10-17 09:28:29  IP: 116.22.190.*
higkoo,你有没有装MYsql了??
发表评论  


当前用户设置只有注册用户才能发表评论。如果你没有登录,请点击登录
Csdn Blog version 3.1a
Copyright © Ben