configure: error: Cannot find php_pdo_driver.h.

Posted 百里

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了configure: error: Cannot find php_pdo_driver.h.相关的知识,希望对你有一定的参考价值。

安装pdo_mysql

cd /usr/local/src/php-5.4.0/ext/pdo_mysql/

/usr/local/php/bin/phpize   # /usr/local/php为php安装后的目录

./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql

sudo make && sudo make install

报configure: error: Cannot find php_pdo_driver.h.错误

原因是安装pdo_mysql前需要先安装pdo

cd  php5.4/ext/pdo/

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/webserver/php/bin/php-config  --enable-pdo=shared

make &&make install

 

然后

交以下几行添加至php/lib/php.ini 文件上

extension_dir = "/usr/local/webserver/php/lib/php/extensions/no-debug-non-zts-20100525/"
extension=pdo.so
extension=pdo_mysql.so



以上是关于configure: error: Cannot find php_pdo_driver.h.的主要内容,如果未能解决你的问题,请参考以下文章

checking for SSL... configure: error: Cannot find ssl libraries

configure: error: Cannot find ldap libraries in /usr/lib 解决办法

编译安装php服务报错问题:configure: error: Cannot find libmysqlclient under /usr.

configure: error: Cannot find php_pdo_driver.h.

Sitecore 9 安装 - error - Config Error: This configuration section cannot be used at this path. This h

brew安装php70出现configure: error: Cannot find libz 错误解决方法