作者Yoper的csdn博客地址:http://blog.csdn.net/chenyoper
作者Yoper的博客园地址:http://www.cnblogs.com/Yoperchen/
本文原始地址:http://www.cnblogs.com/Yoperchen/p/6577790.html
假设php目录为/usr/local/php
mysql目录为/usr/local/mysql
1. 进入PHP源码包ext/pdo目录
cd ext/pdo
2. 执行/usr/local/php/bin/phpize[假设PHP的安装目录为/usr/local/php]
/usr/local/php/bin/phpize
3. 配置扩展pdo
./configure --with-php-config=/usr/local/php/bin/php-config --enable-pdo=shared
4. 编译 && 安装pdo
make && make install
成功则出现
Installing shared extensions: /usr/local/php//lib/php/extensions/no-debug-non-zts-20060613/
Installing header files: /usr/local/php//include/php/
Installing PDO headers: /usr/local/php//include/php/ext/pdo/
说明在/usr/local/php//lib/php/extensions/no-debug-non-zts-20060613/目录下生成了pdo.so文件
如果遇到类似xxx.lo' is not a valid libtool object
请先make clean 一下然后再make && make install
陈永鹏Yoper
2017.03.31