php安装zip扩展
一、安装libzip
cd /usr/local/src
wget https://libzip.org/download/libzip-1.3.2.tar.gz
tar zxf libzip-1.3.2.tar.gz
cd libzip-1.3.2/
./configure
make && make install
如果遇到找不到/usr/local/include/zipconf.h
cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h
二、安装tar zxf zip-1.19.2.tgz
cd /usr/local/src
wget http://pecl.php.net/get/zip-1.19.2.tgz
tar zxf zip-1.19.2.tgz
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
三、在php.ini文件末尾加上extension=zip.so
我的php.ini在/usr/local/php/etc下(找到自己安装php的php.ini文件)
extension=zip.so
最后在重启下php即可
注:有问题可以留言一起学习