环境是在PHP5.4下,configure参数如下:
wget http://pecl.php.net/get/PDO_MYSQL-1.0.2.tgz tar zxf PDO_MYSQL-1.0.2.tgz cd PDO_MYSQL-1.0.2 /usr/local/php/bin/phpize ./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql make make这一步就报错了,错误提示如下: In file included from /root/PDO_MYSQL-1.0.2/pdo_mysql.c:31: /root/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:25:19: error: mysql.h: No such file or directory In file included from /root/PDO_MYSQL-1.0.2/pdo_mysql.c:31: /root/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:36: error: expected specifier-qualifier-list before ‘MYSQL’ /root/PDO_MYSQL-1.0.2/php_pdo_mysql_int.h:48: error: expected specifier-qualifier-list before ‘MYSQL_FIELD’ /root/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 /usr/local/mysql/include/mysql/* /usr/local/include/ 接下来再make和make install,pdo_mysql模块就加进去了。 (责任编辑:IT) |