如何安装PHP的zip模块以支持zip文件操作?
- 内容介绍
- 文章标签
- 相关推荐
本文共计221个文字,预计阅读时间需要1分钟。
在PHP中安装zip扩展时,如果遇到Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOMAKE错误,通常是因为系统中没有安装autoconf工具。以下是简化后的解决步骤:
1. 安装autoconf: sh sudo apt-get update sudo apt-get install autoconf
2. 重新尝试安装zip扩展: sh pecl install zip-1.13.5
php 安装zip模块
为php安装zip扩展
wget pecl.php.net/get/zip-1.13.5.tgz tar -zvxf zip-1.13.5.tgz cd zip-1.13.5 /home/xxx/php/bin/phpize
出现错误:
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.
解决方法:
yum install m4 yum install autoconf
再安装:
/home/xxx/php/bin/phpize ./configure --with-php-config=/home/xxx/php/bin/php-config make make install
然后修改php.ini,添加:
extension=zip.so
重启apache,查看phpinfo是否安装成功
相关教程
本文共计221个文字,预计阅读时间需要1分钟。
在PHP中安装zip扩展时,如果遇到Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOMAKE错误,通常是因为系统中没有安装autoconf工具。以下是简化后的解决步骤:
1. 安装autoconf: sh sudo apt-get update sudo apt-get install autoconf
2. 重新尝试安装zip扩展: sh pecl install zip-1.13.5
php 安装zip模块
为php安装zip扩展
wget pecl.php.net/get/zip-1.13.5.tgz tar -zvxf zip-1.13.5.tgz cd zip-1.13.5 /home/xxx/php/bin/phpize
出现错误:
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF environment variable. Then, rerun this script.
解决方法:
yum install m4 yum install autoconf
再安装:
/home/xxx/php/bin/phpize ./configure --with-php-config=/home/xxx/php/bin/php-config make make install
然后修改php.ini,添加:
extension=zip.so
重启apache,查看phpinfo是否安装成功
相关教程

