问题描述: 安装zlib,在执行./configure --prefix=$PWD/_install 时出现报错: Compiler error reporting is too harsh for ./configure (perhaps remove -Werror).
解决方法:
vi 打开configure 文件,删除以下字段以避免将warn处理为error :
echo “Checking for obsessive-compulsive compiler options…” >> configure.log if try CC -c CFLAGS test.c; then : else echo “Compiler error reporting is too harsh for 0 (perhaps remove -Werror).” | tee -a configure.log leave 1 fi
wq 保存退出,在执行 ./configure … make && make install 编译安装就可以通过了。