./configure: error: the HTTP gzip module requires the zlib library

./configure: error: the HTTP gzip module requires the zlib library

我是 dockers/containers 的新手。

我正在尝试 运行 使用以下命令对 mup-frontend 的 openSSL 漏洞进行修复的分支:

docker build ./

它编译到一个点然后错误

./configure: error: the HTTP gzip module requires the zlib library.
You can either disable the module by using --without-http_gzip_module
option, or install the zlib library into the system, or build the zlib library
statically from the source with nginx by using --with-zlib=<path> option.

我正在 运行宁 mac 所以用 brew 安装了 zlib。我搜索了很长时间,但找不到太多关于这个错误的信息。

由于这个错误,它也无法在 docker.io

中构建自动化

您引用的 Dockerfile

https://github.com/meteorhacks/mup-frontend-server/blob/master/Dockerfile

开头

FROM debian

所以你需要在你的 Dockerfile 中有这样一行,在你需要 zlib 的地方之前

RUN apt-get update && apt-get install -y \ zlib \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/*

在一个 运行 中,您更新、安装和清理

yum install -y httpd-devel pcre perl pcre-devel zlib zlib-devel GeoIP GeoIP-devel


Download required packages

cd 
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.10.tar.gz
wget http://zlib.net/zlib-1.2.5.tar.gz
wget ftp://ftp.openssl.org/source/openssl-0.9.8o.tar.gz

Now you have to untar these files.
tar -xvf zlib-1.2.5.tar.gz
tar -xvf pcre-8.10.tar.gz
tar -xvf openssl-0.9.8o.tar.gz