php5.4.24在安装PDO_mysql模块时,提示 make: *** [pdo_mysql.lo] Error 1

php5.4.24安装编译编译PDO_mysql模块,提示 make: *** [pdo_mysql.lo] Error 1

shell#$ /opt/webs/php/bin/phpize
shell#$ ./configure --with-php-config=/opt/webs/php/bin/php-config --with-pdo-mysql=/opt/webs/mysql
shell#$ make
/bin/sh /kinggoo/src/PDO_MYSQL-1.0.2/libtool --mode=compile cc -I -I/opt/webs/mysql/include  -g -DNDEBUG -I. -I/kinggoo/src/PDO_MYSQL-1.0.2 -DPHP_ATOM_INC -I/kinggoo/src/PDO_MYSQL-1.0.2/include -I/kinggoo/src/PDO_MYSQL-1.0.2/main -I/kinggoo/src/PDO_MYSQL-1.0.2 -I/opt/webs/php/include/php -I/opt/webs/php/include/php/main -I/opt/webs/php/include/php/TSRM -I/opt/webs/php/include/php/Zend -I/opt/webs/php/include/php/ext -I/opt/webs/php/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /kinggoo/src/PDO_MYSQL-1.0.2/pdo_mysql.c -o pdo_mysql.lo 
mkdir .libs
 cc -I -I/opt/webs/mysql/include -g -DNDEBUG -I. -I/kinggoo/src/PDO_MYSQL-1.0.2 -DPHP_ATOM_INC -I/kinggoo/src/PDO_MYSQL-1.0.2/include -I/kinggoo/src/PDO_MYSQL-1.0.2/main -I/kinggoo/src/PDO_MYSQL-1.0.2 -I/opt/webs/php/include/php -I/opt/webs/php/include/php/main -I/opt/webs/php/include/php/TSRM -I/opt/webs/php/include/php/Zend -I/opt/webs/php/include/php/ext -I/opt/webs/php/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /kinggoo/src/PDO_MYSQL-1.0.2/pdo_mysql.c  -fPIC -DPIC -o .libs/pdo_mysql.o
In file included from /kinggoo/src/PDO_MYSQL-1.0.2/pdo_mysql.c:31:
/kinggoo/src/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:25:19: error: mysql.h: No such file or directory
In file included from /kinggoo/src/PDO_MYSQL-1.0.2/pdo_mysql.c:31:
/kinggoo/src/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:36: error: expected specifier-qualifier-list before ‘MYSQL’
/kinggoo/src/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:48: error: expected specifier-qualifier-list before ‘MYSQL_FIELD’
/kinggoo/src/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:53: error: expected specifier-qualifier-list before ‘MYSQL_RES’
make: *** [pdo_mysql.lo] Error 1

解决方法:

ln -s {mysql安装文件路径}/include/mysql/* /usr/local/include/

mysql安装路径,也就是你在编译安装mysql时–prefix后面的路径(如果你是rpm或者yum安装的,请/usr/local/mysql/include/mysql/*

- THE END -
版权声明:
转载原创文章请注明,文章出处://kinggoo.com
原文地址:https://kinggoo.com/error_pdomysql.htm
发表评论?

2 条评论。

  1. 写的不错,欢迎回访哈

发表评论


此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据