问题复现
重新编译php报错
configure: error: Please reinstall the libzip distribution
使用yum安装无效
[root@xinsz08 php-7.3.6]# yum install libzipLoaded 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]# lscmake-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