./configure: error: HTTP gzip模块需要zlib库

3

我是新手,对于Docker/容器这方面的知识并不熟悉。

我正在尝试使用以下命令运行一个fork,其中包含我为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的自动化构建中也无法成功构建。


你需要在容器中安装zlib,这样你的Dockerfile就会有一个zlib的安装。 - user2915097
我该如何在本地操作?我习惯使用npm模块,不太用apt-get等。 - Allreadyhome
2个回答

1

你引用的 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/*

在一个RUN中,你可以更新、安装和清理。


0
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

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接