PHP配置Configure報錯:Please reinstall the libzip distribution
發生情景:
php執行配置命令configure時,報如下錯誤:
checking for libzip... not found
configure: error: Please reinstall the libzip distribution
錯誤含義:
沒有找到libzip
請重新安裝libzip的dev包。
嘗試解決:
(1)移除舊的libzip:
yum remove libzip
(2)安裝新版本:
curl-O 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版本:
curl-O 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