在编辑 PHP的时候出现下面的错误:

configure: error: Cannot find MySQL header files under yes.
Note that the MySQL client library is not bundled anymore.

解决方法 1:

 

如果不知道 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

 

解决方法二  :

这是因为少了  mysql-devel 这个包

  安装好这个包就行了

rpm -ivh mysql-devel-5.0.77-3.el5.i386.rpm