首页 > 技术文章 > configure: error: zlib library and headers are required

laodageblog 2016-07-29 15:57 原文

 

configure: error: zlib library and headers are required

(1)直接看是zlib没安装导致的,yum list |grep zlib* 看到的是全部都安装好的;

(2)直接打开configure,这个是一个shell脚本,找到报错的这一行;设置set -x结果发现一大串的日志输出,并没有什么有效的信息;

(3)打开config.log,里面有报错的,原来这里有报错

configure:35519: result: no
configure:35524: checking whether zlib support suffices
configure:35527: error: zlib library and headers are required

  具体的命令

gcc -std=gnu99 -o conftest -g -O2 -I/usr/local/include -L/usr/local/lib64 conftest.c -lrt -ldl -lm

  单独看到这里测试的是zlib的版本,必须是高于1.2.5

 

推荐阅读