php动态安装mysql扩展错误(ext/mysqlnd/mysqlnd.h: No such file or directory)

来源:清泛原创     2017-03-07 10:53:14    人气:     我有话说( 0 人参与)

清泛网(www.tsingfun.com):错误如下:In file included from data xingzheng install php-5.5.10 include php Zend zend_compile.h:719, from ...

错误如下:

In file included from /data/xingzheng/install/php-5.5.10/include/php/Zend/zend_compile.h:719,
                 from /data/xingzheng/install/php-5.5.10/include/php/Zend/zend_modules.h:26,
                 from /data/xingzheng/install/php-5.5.10/include/php/Zend/zend_API.h:26,
                 from /data/xingzheng/install/php-5.5.10/include/php/main/php.h:38,
                 from /data/xingzheng/software/php-5.5.10/ext/mysql/php_mysql.c:32:
/data/xingzheng/install/php-5.5.10/include/php/Zend/zend_vm_opcodes.h:173:7: warning: no newline at end of file
In file included from /data/xingzheng/software/php-5.5.10/ext/mysql/php_mysql.c:69:
/data/xingzheng/software/php-5.5.10/ext/mysql/php_mysql_structs.h:39:33: error: ext/mysqlnd/mysqlnd.h: No such file or directory
In file included from /data/xingzheng/software/php-5.5.10/ext/mysql/php_mysql_structs.h:40,
                 from /data/xingzheng/software/php-5.5.10/ext/mysql/php_mysql.c:69:
/data/xingzheng/software/php-5.5.10/ext/mysql/mysql_mysqlnd.h:25:49: error: ext/mysqlnd/mysqlnd_libmysql_compat.h: No such file or directory
...

解决办法:重新安装php,在编译php的时候,加上 mysql配置如下:

./configure ...  --with-mysql=shared,mysqlnd

标签: mysql  php  扩展 

注:本文为本站或本站会员原创优质内容,版权属于原作者及清泛网所有,
欢迎转载,转载时须注明版权并添加来源链接,谢谢合作! (编辑:admin)