天天看點

ubuntu php libzip安裝 ./configure報錯 checking for libzip... not found configure

借鑒:

https://blog.csdn.net/qq_39034363/article/details/90547741

https://www.cnblogs.com/Julian-Chen/p/9449360.html

本文教大家ubuntu系統安裝php的擴充 libzip

正文

我在執行

./configure
           

最後的報錯資訊

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

解決:

去官網下載下傳找最新版本上傳伺服器

ubuntu php libzip安裝 ./configure報錯 checking for libzip... not found configure

我這裡直接複制連結位址,然後下載下傳到伺服器上

ubuntu php libzip安裝 ./configure報錯 checking for libzip... not found configure
wget https://libzip.org/download/libzip-1.8.0.tar.gz
           

下載下傳好之後

tar -zxvf libzip*.gz

進入目錄

           

這時執行

./configure

是會失敗的

需要找一個config.m4檔案 到需要編譯的目錄

ubuntu php libzip安裝 ./configure報錯 checking for libzip... not found configure

然後執行phpize

ubuntu php libzip安裝 ./configure報錯 checking for libzip... not found configure

然後

cd build
cmake ..
           

如果提示,就更新

借鑒:https://blog.csdn.net/banyu0052/article/details/101946336

我這裡直接用apt安裝了

apt-get install cmake -y
           

如果報錯

/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.10/Modules/FindZLIB.cmake:112 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:174 (FIND_PACKAGE)

           

解決

apt-get install libhdf5-serial-dev hdf5-tools
           

繼續

make && make install
           

至此 教程結束

有問題可以私信我,每天都會看