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

问题描述

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

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

yum remove libzip libzip-devel

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

2.下载libzip

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


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

如:下载libzip.1.3.2版本:

https://libzip.org/download/libzip-1.3.2.tar.gz

 3.编译安装

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会话中设置了这个环境变量

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博客

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-13 06:48:03       70 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-13 06:48:03       74 阅读
  3. 在Django里面运行非项目文件

    2024-07-13 06:48:03       62 阅读
  4. Python语言-面向对象

    2024-07-13 06:48:03       72 阅读

热门阅读

  1. centos 安装vnc,配置图形界面

    2024-07-13 06:48:03       20 阅读
  2. 客户端与服务端之间的通信连接

    2024-07-13 06:48:03       27 阅读
  3. Redis服务器统计和配置信息简介

    2024-07-13 06:48:03       27 阅读
  4. React:useState和useEffect

    2024-07-13 06:48:03       28 阅读
  5. MySQL 面试真题(带答案)

    2024-07-13 06:48:03       18 阅读
  6. C#中的方法

    2024-07-13 06:48:03       25 阅读
  7. C# Path

    2024-07-13 06:48:03       27 阅读
  8. MyBatis(35)如何在 MyBatis 中实现软删除

    2024-07-13 06:48:03       26 阅读
  9. XML 应用程序

    2024-07-13 06:48:03       24 阅读
  10. 在Ubuntu 16.04上安装和保护MongoDB的方法

    2024-07-13 06:48:03       21 阅读