博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Nginx编译安装错误error: the HTTP gzip module requires the zlib library
阅读量:2395 次
发布时间:2019-05-10

本文共 910 字,大约阅读时间需要 3 分钟。

在nginx中我们执行./configure 会提示error: the HTTP gzip module requires the zlib library意思是告诉我们没有zlib library的支持了 碰到此类问题我们只要安装这个库就可以了。

下载后,解包,并进入nginx

tar -zxf nginx-1.4.7.tar.gzcd nginx-1.4.7

开始nginx安装:

./configuremakemake install

若在./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_moduleoption, or install the zlib library into the system, or build the zlib librarystatically from the source with nginx by using –with-zlib=
option.

则需要安装zlib-devel即可。SSH执行以下命令:

代码如下 复制代码

yum install -y zlib-devel

然后再进行nginx的编译。表示问题即可解决。

像还有一些其它组件错误如:

You need a C++ compiler for C++ support

缺少c++编译器的原因

yum install -y gcc gcc-c++make[1]: *** [/usr/local/pcre/Makefile] Error 127.pcre指向错误

指向源码包,不是编译安装后的包,所以

./configure –prefix=/export/lnmp/nginx-1.4.7 –with-pcre=../pcre-8.34

转载地址:http://dyzob.baihongyu.com/

你可能感兴趣的文章
相似图片搜索——感知哈希算法
查看>>
编译原理 词法分析
查看>>
计算机系统结构 计算机指令集结构
查看>>
计算机系统结构 输入/输出系统
查看>>
信息安全技术及应用 常规加密技术
查看>>
02-线性结构1 两个有序链表序列的合并
查看>>
HDU 1080 DP LCS
查看>>
HDU 3308 线段树+区间合并
查看>>
ASP.NET 入手页面控件及事件触发
查看>>
HDU 4123 树状DP+RMQ
查看>>
vim配置文件(持续更新)
查看>>
Fedora 16下添加终端快捷键
查看>>
HDU 4001 DP LIS
查看>>
HDU 4023 贪心+博弈
查看>>
HDU 4036 物理坑爹题
查看>>
Linux文件解压命令汇总(持续更新)
查看>>
HDU 4046 树状数组
查看>>
HDU 4034 图论 Floyd
查看>>
HDU 4027 线段树
查看>>
HDU 4049 状态压缩DP
查看>>