Home > Article > Operation and Maintenance > What to do if the mysql.h file cannot be found under centos
Problem description:
c The program accesses mysql and reports an error, indicating that the mysql.h file cannot be found.
Solution:
Although mysql-libs has been installed, you still need to install the mysql development package.
yum install mysql-devel
The error is reported because the packages used by PHP to access mysql conflict with those already installed in the system. Follow the prompts to execute the following command to skip these packages:
yum --skip-broken install mysql-devel
locate mysql.h
You can find it after completing the above operations.
Recommended tutorial: centos tutorial
The above is the detailed content of What to do if the mysql.h file cannot be found under centos. For more information, please follow other related articles on the PHP Chinese website!