cmake编译zipper错误提示: Please check that LIBZ_LIBRARY-NOTFOUND
解决问题
操作系统:
ubuntu 16.04 14.04
编译方式:
cmake gcc g++
移植zipper 支持zip库压缩
zipper c++下载地址
https://github.com/sebastiandev/zipper
编译方法
安装好cmake,编译zipper错误,没有能生成我们想要的Makefile编译脚本
$ cd zipper
$ mkdir build
$ cmake ../
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning at CMakeLists.txt:158 (message):
The chosen zlib library does not appear to be valid because it is
missing certain required symbols. Please check that LIBZ_LIBRARY-NOTFOUND
is
the correct zlib library. For details about the error, please see
/home/tony/linux/zipper/build/CMakeFiles/CMakeError.log
CMake Error at CMakeLists.txt:167 (message):
The include directory specified for zlib does not appear to be
valid. It should contain the file zlib.h, but it does not. Please
verify the LIBZ_INCLUDE_DIR variable.
-- Configuring incomplete, errors occurred!
这时安装提示的zlib工具即可
解决方法
tony@Fighting:~/linux/zipper/build$ sudo apt install -y libz-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
注意,选中 'zlib1g-dev' 而非 'libz-dev'
下列软件包是自动安装的并且现在不需要了:
linux-headers-4.4.0-127 linux-headers-4.4.0-127-generic linux-headers-4.4.0-130 linux-headers-4.4.0-130-generic linux-image-4.4.0-127-generic linux-image-4.4.