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

清泛原创
错误如下:

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 扩展

分享到:
评论加载中,请稍后...
创APP如搭积木 - 创意无限,梦想即时!
回到顶部