Ubuntu Nginx ./configure: error: the HTTP gzip module requires the zlib library. You can either...

待我称王封你为后i 2021-09-07 06:08 485阅读 0赞

新手用Ubuntu(乌班图)系统装Nginx可真是不容易啊,第一个PCRE的问题搜一下还挺好解决的,但zlib搜半天不知道在哪里下载:

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

安装教程:

1.找一个临时目录,下载命令:wget http://www.zlib.net/zlib-1.2.11.tar.gz(2年没更新了,估计这个是最终版了,[官网][Link 1])

2.解压命令:tar -xzvf zlib-1.2.11.tar.gz

3.进入当前文件夹:cd zlib-1.2.11

4.安装命令:

  1. ./configure
  2. make
  3. make install

至此安装完成,再次执行

  1. ./configure --prefix=/usr/local/nginx

就行啦

发表评论

表情:
评论列表 (有 0 条评论,485人围观)

还没有评论,来说两句吧...

相关阅读