宝塔7.4的源码目录里面已经有zip扩展,直接进去安装
cd /www/server/php/74/src/ext/zip
./configure --with-php-config=/www/server/php/74/bin/php-config
报如下错误
checking for zip archive read/write support... yes, shared
checking for libzip >= 0.11... no
configure: error: Package requirements (libzip >= 0.11) were not met:
Requested 'libzip >= 0.11' but version of libzip is 0.10.1
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBZIP_CFLAGS
and LIBZIP_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
libzip版本太低先升级 libzip
升级 libzip
#卸载旧版本的libzip yum remove libzip,然后在下载安装
cd /opt
wget https://libzip.org/download/libzip-1.5.2.tar.gz
tar -zxvf libzip-1

本文介绍了解决宝塔7.4中ZIP扩展安装过程中遇到的libzip版本过低的问题。通过卸载旧版libzip并安装新版libzip-1.5.2来满足依赖需求,最终成功配置PHP的ZIP扩展。
最低0.47元/天 解锁文章
3723

被折叠的 条评论
为什么被折叠?



