Linux学习笔记总结(一百零五)- 二进制安装nginx问题解决

二进制安装nginx问题解决

在预编译nginx时出现以下错误提示:

./configure --user=www --group=www --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module

checking for OS

 + Linux 3.10.0-957.el7.x86_64 x86_64

checking for C compiler ... not found

 

./configure: error: C compiler cc is not found

Linux学习笔记总结(一百零五)_centos

问题是没有安装c/gcc编译器,需要安装gcc,我们直接yum安装gcc即可

yum install gcc –y

在此预编译,出现下面错误提示:

./configure: error: the HTTP rewrite module requires the PCRE library.

You can either disable the module by using --without-http_rewrite_module

option, or install the PCRE library into the system, or build the PCRE library

提示没有PCRE,我们再进行yum安装

yum install pcre-devel –y

出现以下错误代码:

./configure: error: SSL modules require the OpenSSL library.

You can either do not enable the modules, or install the OpenSSL library

into the system, or build the OpenSSL library statically from the source

with nginx by using --with-openssl=<path> option.

yum install openssl-devel  

再次预编译完成预编译,然后再执行make以及make install,完成nginx的安装。

Linux学习笔记总结(一百零五)_linux_02