博学而笃志 切问而近思 仁在其中
详情
phpize报cannot find autoconf的解决方法
作者:Aliot     发布时间:2017-07-02     评论:0     阅读:0

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

查看本栏目更多精彩内容:http://www.bianceng.cn/webkf/PHP/

发现在当前目录下生成了 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


相关文章
loading......
最新动态
所有评论

loading......

网站声明:
本站部分内容来自网络,如您发现本站内容
侵害到您的利益,请联系本站管理员处理。
联系站长
373515719@qq.com
关于本站:
编程参考手册