configure: error: Please reinstall the libzip distribution

问题复现

重新编译php报错

configure: error: Please reinstall the libzip distribution

使用yum安装无效

[root@xinsz08 php-7.3.6]# yum install libzip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package libzip-0.10.1-8.el7.x86_64 already installed and latest version
Nothing to do

问题解决

下载新版本

[root@xinsz08 php-7.3.6]# curl -O https://libzip.org/download/libzip-1.5.2.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
[root@xinsz08 ~]# tar xf libzip-1.5.2.tar.gz
[root@xinsz08 ~]# cd libzip-1.5.2

[root@xinsz08 bulid]# yum install cmake

[root@xinsz08 bulid]# mkdir bulid
[root@xinsz08 bulid]# cd bulid/
[root@xinsz08 bulid]# yum remove libzip

cmake版本也会出现过低的情况:

下载cmake

root@xinsz08 bulid]# wget https://cmake.org/files/v3.18/cmake-3.18.0-Linux-x86_64.sh
[root@xinsz08 ~]# chmod 777 cmake-3.18.0-Linux-x86_64.sh   ## 加权限

卸载掉原来的cmake

[root@xinsz08 ~]# yum remove cmake

执行脚本安装新的
[root@xinsz08 ~]# ./cmake-3.18.0-Linux-x86_64.sh

进入build目录

[root@xinsz08 libzip-1.5.2]# cd bulid/
[root@xinsz08 bulid]# ls
cmake-3.18.0-Linux-x86_64.sh  CMakeCache.txt  CMakeFiles

执行cmake
做软连接

[root@xinsz08 bulid]# ln -s /home/zmedu/cmake-3.18.0-Linux-x86_64/bin/cmake /usr/bin/cmake

编译

[root@xinsz08 bulid]# cmake ..
[root@xinsz08 bulid]# make
[root@xinsz08 bulid]# make install

安装成功后,继续编译php7

本文转自 ID: 互联网老辛 更多内容关注公众号《极客运维之家》,扫码添加:

在这里插入图片描述

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值