cmake编译zipper错误提示: Please check that LIBZ_LIBRARY-NOTFOUND

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.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

fttony2020

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值