【Linux】centos7安装PHP7.4报错:libzip版本过低

问题描述

configure: error: Package requirements (libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0) were not met:

javascript 复制代码
checking for libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0... no
configure: error: Package requirements (libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0) 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的版本小于0.11比较低,需要更新升级,而且libzip升级版本不能是1.3.1,1.7.0的。

查看服务器上libzip的版本

rpm -qa|grep libzip

解决方案:升级libzip

1.卸载旧版libzip

bash 复制代码
yum remove libzip libzip-devel

验证是否卸载成功:rpm -qa|grep libzip,如无输出信息则卸载成功。

2.下载libzip

官网地址:https://libzip.org/download/

也可以直接在download后直接拼接要下载的libzip的版本

如:下载libzip.1.3.2版本:

bash 复制代码
https://libzip.org/download/libzip-1.3.2.tar.gz

3.编译安装

bash 复制代码
tar -zxvf libzip-1.3.2.tar.gz
cd libzip-1.3.2/
./configure
make && make install

安装完成后,查看是否存在/usr/local/lib/pkgconfig目录,如果存在,

执行如下命令来设置PKG_CONFIG_PATH:

注意:只是在当前的shell会话中设置了这个环境变量

bash 复制代码
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig/"

验证libzip:whereis libzip

参考:configure: error: Package requirements (libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0) were not met_configure: error: package requirements (libzip >= -CSDN博客

相关推荐
轻松Ai享生活4 小时前
5 节课深入学习Linux Cgroups
linux
Bruce1235 小时前
web专题之php代审(二)
php
christine-rr5 小时前
linux常用命令(4)——压缩命令
linux·服务器·redis
三坛海会大神5555 小时前
LVS与Keepalived详解(二)LVS负载均衡实现实操
linux·负载均衡·lvs
東雪蓮☆5 小时前
深入理解 LVS-DR 模式与 Keepalived 高可用集群
linux·运维·服务器·lvs
BingoGo5 小时前
PHP-FPM 深度调优指南 告别 502 错误,让你的 PHP 应用飞起来
后端·php
乌萨奇也要立志学C++6 小时前
【Linux】进程概念(二):进程查看与 fork 初探
linux·运维·服务器
獭.獭.7 小时前
Linux -- 信号【上】
linux·运维·服务器
hashiqimiya7 小时前
centos配置环境变量jdk
linux·运维·centos
hashiqimiya7 小时前
权限更改centos中系统文件无法创建文件夹,使用命令让普通用户具备操作文件夹
linux