centOS安装nginx的一些常见问题

Posted zzzqi

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了centOS安装nginx的一些常见问题相关的知识,希望对你有一定的参考价值。

centOS安装nginx的常见问题

./configure:error:c compile cc is not found

当执行命令

./configure

编译安装nginx时报error:c compile cc is not found

解决:

执行命令

yum -y install gcc gcc-c++ autoconf automake make

等待系统安装gcc完毕后再次执行

./configure

nginx编译安装错误: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= option.

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

执行命令

yum install -y zlib-devel

等待安装完毕后再次执行即可

./configure

以上是关于centOS安装nginx的一些常见问题的主要内容,如果未能解决你的问题,请参考以下文章

HLS NGINX-RTMP [错误] 1281#0:* 58 hls:强制片段拆分:10.002 秒

将 nginx rtmp 片段发送到 WebRTC

Nginx配置文件详细介绍

linux学习:Nginx--常见功能配置片段与优化-06

使用docker安装nginx

当 ViewPager 中的片段出现和消失时如何执行一些代码