编译 php5217 时 configure 报错:
checking for specified location of the MySQL UNIX socket... /var/lib/mysql/mysql.sock checking for MySQL UNIX socket location... /var/lib/mysql/mysql.sock configure: error: Cannot find MySQL header files under yes. Note that the MySQL client library is not bundled anymore!
由于安装mysql时没有安装mysql头文件,或者是路径指定不正确,php找不到mysql的头文件引起的错误提示。
解决方法:
1. 查看你的系统有没有安装mysql header
find / -name mysql.h
输出:
/usr/include/mysql/mysql.h
如果有。请指定路径:–with-mysql=/usr
如果没有这个头文件,或者已经指定了正确路径依然报错。请看下一步:
yum install -y mysql-devel yum install -y mariadb-devel