configure: error: Cannot find MySQL header files under yes

Fix the "configure: error: Cannot find MySQL header files" error while compiling PHP. Find out how to install the missing MySQL libraries on Linu...

While compiling PHP, we may run into several errors, mainly resulting from missing developer libraries; here's one of them:

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

To eliminate the above error, we install the following package:

  • Debian / Ubuntu : aptitude install libmysqlclient15-dev (32/64 bit)
  • RedHat / CentOS / Fedora : yum install mysql-devel.x86_64 (64 bit) / yum install mysql-devel (32 bit)