一,安装cmake
二,下载安装libzip
wget https://libzip.org/download/libzip-1.2.0.tar.gz
tar -zxvf libzip-1.2.0.tar.gz
cd libzip-1.2.0
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/libzip -DENABLE_OPENSSL=on -DENABLE_GNUTLS=off -DENABLE_MBEDTLS=off
./configure --prefix=/usr/local/libzip
make && make install
三,添加变量
vim /etc/ld.so.conf.d/libzip.conf
内容
/usr/local/lib64/
/usr/local/lib/
/lib/
/lib64/
/usr/local/include/
/usr/local/share/
/usr/local/libzip/include/
/usr/local/libzip/lib64/
/usr/local/libzip/share/
四,刷新
ldconfig
五,设置PKG_CONFIG_PATH
export PKG_CONFIG_PATH="/usr/local/lib64/pkgconfig/"