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

Nginx大约 455 字

现象

若在“./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
阅读 625 · 发布于 2019-04-19

————        END        ————

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

昵称:
随便看看换一批