码迷,mamicode.com
首页 > Web开发 > 详细

phpize报cannot find autoconf

时间:2014-05-09 21:06:27      阅读:375      评论:0      收藏:0      [点我收藏+]

标签:php   phpize   

突然想往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]$ phpize

Configuring for:

PHP Api Version:         20121113

Zend Module Api No:      20121212

Zend Extension Api No:   220121212

Cannot 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]$ phpize

Configuring for:

PHP Api Version:         20121113

Zend Module Api No:      20121212

Zend 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]# ll

total 152

drwxr-xr-x 3 root root 4096 May  9 05:09 date

drwxr-xr-x 2 root root 4096 May  9 05:09 dom

drwxr-xr-x 3 root root 4096 May  9 05:09 ereg

drwxr-xr-x 2 root root 4096 May  9 05:09 filter

drwxr-xr-x 2 root root 4096 May  9 05:09 hash

drwxr-xr-x 2 root root 4096 May  9 05:09 iconv

drwxr-xr-x 2 root root 4096 May  9 05:09 json

drwxr-xr-x 2 root root 4096 May  9 05:09 libxml

drwxr-xr-x 4 root root 4096 May  9 05:09 mbstring

drwxr-xr-x 2 root root 4096 May  9 07:32 mysqli

drwxr-xr-x 3 root root 4096 May  9 05:09 pcre

drwxr-xr-x 2 root root 4096 Apr 29 13:07 pdo

drwxr-xr-x 2 root root 4096 May  9 05:09 phar

drwxr-xr-x 2 root root 4096 May  9 05:09 session

drwxr-xr-x 2 root root 4096 May  9 05:09 sockets

drwxr-xr-x 2 root root 4096 May  9 05:09 spl

drwxr-xr-x 3 root root 4096 Apr 27 15:11 sqlite3

drwxr-xr-x 2 root root 4096 May  9 05:10 standard

drwxr-xr-x 2 root root 4096 May  9 05:10 xml



phpize报cannot find autoconf,布布扣,bubuko.com

phpize报cannot find autoconf

标签:php   phpize   

原文地址:http://blog.csdn.net/angel22xu/article/details/25390857

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!