ext/mysqlnd/mysqlnd.h:没有那个文件或目录,编译出错,请求大侠帮忙

jxdyzwh 2015-07-27 05:41:37
各位好,我用源码安装PHP,由于mysql和php是分别安装的,现在想将php的配置加入mysql,报错如下,真诚希望各位大侠帮忙下,看看是啥原因引起的,系统是cetnos7
cd /usr/local/jana/software/php-5.6.11/ext/mysql
phpize
./configure --with-file-path=/usr/local/jana/conf --with-mysql=/var/lib/mysql
[root@bogon mysql]# ./configure --with-file-path=/usr/local/jana/conf --with-mysql=/var/lib/mysql
configure: WARNING: unrecognized options: --with-file-path
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20131226
checking for PHP installed headers prefix... /usr/local/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for MySQL support... yes, shared
checking for specified location of the MySQL UNIX socket... no
checking for the location of libz... no
configure: error: Cannot find MySQL header files under /var/lib/mysql.
Note that the MySQL client library is not bundled anymore!
[root@bogon mysql]#
[root@bogon mysql]# make
/bin/sh /usr/local/jana/software/php-5.6.11/ext/mysql/libtool --mode=compile cc -I. -I/usr/local/jana/software/php-5.6.11/ext/mysql -DPHP_ATOM_INC -I/usr/local/jana/software/php-5.6.11/ext/mysql/include -I/usr/local/jana/software/php-5.6.11/ext/mysql/main -I/usr/local/jana/software/php-5.6.11/ext/mysql -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/jana/software/php-5.6.11/ext/mysql/php_mysql.c -o php_mysql.lo
cc -I. -I/usr/local/jana/software/php-5.6.11/ext/mysql -DPHP_ATOM_INC -I/usr/local/jana/software/php-5.6.11/ext/mysql/include -I/usr/local/jana/software/php-5.6.11/ext/mysql/main -I/usr/local/jana/software/php-5.6.11/ext/mysql -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /usr/local/jana/software/php-5.6.11/ext/mysql/php_mysql.c -fPIC -DPIC -o .libs/php_mysql.o
In file included from /usr/local/jana/software/php-5.6.11/ext/mysql/php_mysql.c:69:0:
/usr/local/jana/software/php-5.6.11/ext/mysql/php_mysql_structs.h:39:33: 致命错误:ext/mysqlnd/mysqlnd.h:没有那个文件或目录
#include "ext/mysqlnd/mysqlnd.h"
...全文
498 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
夏之冰雪 2015-07-28
  • 打赏
  • 举报
回复
php的一个已知bug,不行就换版本吧: https://bugs.php.net/bug.php?id=65377 还有一种解决办法,重现安装php,加这行 --with-mysql=shared,mysqlnd
jxdyzwh 2015-07-28
  • 打赏
  • 举报
回复
楼上的,我已经安装了,还是没有用,对了我是用mysql我是用yum安装的,而php,nginx之类的我是源码安装的,报错的那个php文件,是php源码的文件,没有进行修改
Suckor 2015-07-27
  • 打赏
  • 举报
回复
应该是没有装mysql的开发包, 装一下 *mysql*-dev, *mysql*-devel 之类的试一下

20,359

社区成员

发帖
与我相关
我的任务
社区描述
“超文本预处理器”,是在服务器端执行的脚本语言,尤其适用于Web开发并可嵌入HTML中。PHP语法利用了C、Java和Perl,该语言的主要目标是允许web开发人员快速编写动态网页。
phpphpstorm 技术论坛(原bbs)
社区管理员
  • 开源资源社区
  • phpstory
  • xuzuning
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧