首页 / 网页编程 / PHP / phpize报cannot find autoconf的解决方法
phpize报cannot find autoconf的解决方法2014-08-15突然想往php种增加个模块,可是又不想重新编译php,因为真的比较费时间。phpize就可以解决这个问题。cd到php的源代码目录,进入ext。比如我的工作当做就需要追加mysqli模块,进入mysqli目录。[vagrant@rs-1 mysqli]$ pwd/home/vagrant/download/php-5.5.11/ext/mysqli执行phpize, 咦,报错了!![vagrant@rs-1 mysqli]$ phpizeConfiguring for:PHP Api Version: 20121113Zend Module Api No: 20121212Zend Extension Api No: 220121212Cannot find autoconf. Please check your autoconf installation and the$PHP_AUTOCONF environment variable. Then, rerun this script.google了下,解决方法如下:安装autoconf[vagrant@rs-1 mysqli]$ sudo yum install autoconfig再次执行phpize没有报错。[vagrant@rs-1 mysqli]$ phpizeConfiguring for:PHP Api Version: 20121113Zend Module Api No: 20121212Zend Extension Api No: 220121212发现在当前目录下生成了 configure文件。执行configure[vagrant@rs-1 mysqli]$ ./configure --with-php-config=/usr/local/bin/php-config --with-mysqli=/usr/bin/mysql_config编译安装[vagrant@rs-1 mysqli]$ sudo make && sudo make install这时候会发现/usr/local/include/php/ext目录多出了mysqli模块[root@rs-1 ext]# lltotal 152drwxr-xr-x 3 root root 4096 May 9 05:09 datedrwxr-xr-x 2 root root 4096 May 9 05:09 domdrwxr-xr-x 3 root root 4096 May 9 05:09 eregdrwxr-xr-x 2 root root 4096 May 9 05:09 filterdrwxr-xr-x 2 root root 4096 May 9 05:09 hashdrwxr-xr-x 2 root root 4096 May 9 05:09 iconvdrwxr-xr-x 2 root root 4096 May 9 05:09 jsondrwxr-xr-x 2 root root 4096 May 9 05:09 libxmldrwxr-xr-x 4 root root 4096 May 9 05:09 mbstringdrwxr-xr-x 2 root root 4096 May 9 07:32 mysqlidrwxr-xr-x 3 root root 4096 May 9 05:09 pcredrwxr-xr-x 2 root root 4096 Apr 29 13:07 pdodrwxr-xr-x 2 root root 4096 May 9 05:09 phardrwxr-xr-x 2 root root 4096 May 9 05:09 sessiondrwxr-xr-x 2 root root 4096 May 9 05:09 socketsdrwxr-xr-x 2 root root 4096 May 9 05:09 spldrwxr-xr-x 3 root root 4096 Apr 27 15:11 sqlite3drwxr-xr-x 2 root root 4096 May 9 05:10 standarddrwxr-xr-x 2 root root 4096 May 9 05:10 xml