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