霜天部落 | 专注PHP研发,研究LAMP高性能架构部署与优化

运行phpize时出现:Cannot find autoconf

今天编译PHP 以便加上 mysqli 扩展,在运行/usr/local/php/bin/phpize时出现:

Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519

Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.

根据网上的解决办法是下载安装m4和autoconf:

# cd /usr/src
# wget http://ftp.gnu.org/gnu/m4/m4-1.4.16.tar.gz
# tar -zvxf m4-1.4.16.tar.gz
# cd m4-1.4.16/
# ./configure && make && make install
# cd ../
# wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.62.tar.gz
# tar -zvxf autoconf-2.62.tar.gz
# cd autoconf-2.62/
# ./configure && make && make install

其实用yum可以更容易把没安装的包安装好:)

yum install m4

yum install autoconf