CentOS 7 源碼安裝 libzip 1.8.0,解決 error: Please reinstall the libzip distributio 或 error: system libzip must be upgraded to version >= 0.11 錯誤。
1、準備編譯環(huán)境
yum install openssl-devel bzip2 bzip2-devel
2、下載源碼,并解壓
wget https://libzip.org/download/libzip-1.8.0.tar.gz \
&& tar -zxf libzip-1.8.0.tar.gz \
&& cd libzip-1.8.0
備用下載地址:https://down.24kplus.com/linux/libzip/libzip-1.8.0.tar.gz
3、編譯安裝
mkdir build && cd build \
&& cmake -DCMAKE_INSTALL_PREFIX=/usr .. \
&& make \
&& sudo make install
如果提示 cmake: command not found,需要先安裝 cmake。