编译出错了,小弟我出大事了,ext/mysqlnd/mysqlnd.h:没有那个文件或目录
编译出错了,我出大事了,ext/mysqlnd/mysqlnd.h:没有那个文件或目录
各位好,我用源码安装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"
------解决思路----------------------
http://dev.mysql.com/downloads/connector/php-mysqlnd/
Download Source Code & Binaries
All 3 PHP MySQL extensions and the mysqlnd library are part of the source code of PHP. The source code and binaries are available from: http://php.net/downloads.php
PHP 5.4 has mysqlnd as default
As of PHP 5.4, the mysqlnd library is a php.net compile time default to all PHP MySQL extensions. Also, the php.net Windows team is using mysqlnd for the official PHP Windows distribution since mysqlnd became available in PHP 5.3.
各位好,我用源码安装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"
------解决思路----------------------
http://dev.mysql.com/downloads/connector/php-mysqlnd/
Download Source Code & Binaries
All 3 PHP MySQL extensions and the mysqlnd library are part of the source code of PHP. The source code and binaries are available from: http://php.net/downloads.php
PHP 5.4 has mysqlnd as default
As of PHP 5.4, the mysqlnd library is a php.net compile time default to all PHP MySQL extensions. Also, the php.net Windows team is using mysqlnd for the official PHP Windows distribution since mysqlnd became available in PHP 5.3.