php预编译报错error: system libzip must be upgraded to version >= 0.11

今天在编译安装php7.3的时候报错error: system libzip must be upgraded to version >= 0.11,通过报错信息可以看到是zip版本过低导致。

解决办法:

1、卸载原zip

[root@wxjtest195 php-7.3.11]# yum  -y remove libzip-devel

2、下载并编译安装

[root@wxjtest195 opt]# wget https://libzip.org/download/libzip-1.3.2.tar.gz
[root@wxjtest195 opt]# tar xf libzip-1.3.2.tar.gz 
[root@wxjtest195 opt]# cd libzip-1.3.2/
[root@wxjtest195 libzip-1.3.2]# ./configure ;make ;make install

拓展:1.5版本以上采用以下方式安装

 yum -y install cmake
 wget https://libzip.org/download/libzip-1.5.1.tar.gz
 tar -zxvf libzip-1.5.1.tar.gz
 cd libzip-1.5.1
 mkdir build
 cd build
 cmake .. 
 make && make install 

发表评论

后才能评论