PHP配置Configure报错:Please reinstall the libzip distribution

精帖 2262
一讯
一讯 2020-02-28 13:37:23
土匪头子

发生情景:

php执行配置命令configure时,报如下错误:

checking for libzip... not found
configure: error: Please reinstall the libzip distribution

错误含义:

没有找到libzip


请重新安装libzip的dev包。

尝试解决:

(1)移除旧的libzip:

yum remove libzip

(2)安装新版本:

  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

注意:如果提示cmake版本过低,需新版本,则需要重新安装cmake。

注意:低版本的可能不需要cmake,例如1.2版本:

  wget https://nih.at/libzip/libzip-1.2.0.tar.gz
  tar -zxvf libzip-1.2.0.tar.gz
  cd libzip-1.2.0
  ./configure
  make && make install