无法添加 nginx 模块 - 需要 zlib

无法添加 nginx 模块 - 需要 zlib

我正在尝试添加nginx mp4上传模块通过

./configure --add-module=/tmp/nginx-upload-module-2.2.0

但它给出了这个(如下)错误。无论我怎么尝试,都无法安装zlib。我需要帮助。

./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.

当我尝试zlib通过安装时

sudo apt-get install zlib1g-dev这次给出的是错误

Package zlib1g-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

编辑:Ubuntu 版本:

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.3 LTS
Release:        16.04
Codename:       xenial

答案1

不过有点晚了。我猜你需要安装该包的所有依赖项。尝试运行:

apt-get install libpcre3 libpcre3-dev zlib1g zlib1g-dev libssl-dev

相关内容