Nginx 编译安装时提示 the HTTP gzip module requires the zlib library

Nginx CentOS Ubuntu 大约 452 字

现象

若在./configure后添加--with-http_gzip_static_module参数(添加gzip压缩模块)提示以下错误:

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

CentOS

sudo yum install zlib-devel

Ubuntu

sudo apt-get install zlib1g-dev
阅读 3512 · 发布于 2019-04-19

————        END        ————

扫描下方二维码关注公众号和小程序↓↓↓

扫描二维码关注我
昵称:
随便看看 换一批