升级出现 ZipArchive 解决
宝塔面板php7.4不支持ZipArchive解决方法
安装libzip
先删除旧版本 yum remove zip #下载编译安装 wget https://nih.at/libzip/libzip-1.2.0.tar.gz tar -zxvf libzip-1.2.0.tar.gz cd libzip-1.2.0 ./configure make && make install
安装完成后,查看是否存在/usr/local/lib/pkgconfig目录,如果存在,执行如下命令来设置PKG_CONFIG_PATH:
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/"
安装ZipArchive
cd /www/server/php/74/src/ext/zip /www/server/php/74/bin/phpize ./configure --with-php-config=/www/server/php/74/bin/php-config make && make install echo "extension = zip.so" >> /www/server/php/74/etc/php.ini
最后在软件商店重启一下 PHP 服务即可。