Compile and install nginx error solution!

Compile and install execution

./configure --prefix=/root/web/nginx --sbin-path=/root/web/nginx/sbin/nginx --conf-path=/root/web/nginx/config/nginx.conf --error-log-path=/root/web/nginx/logs/error.log --pid-path=/root/web/nginx/logs/nginx.pid --http-log-path=/root/web/nginx/logs/access.log

 


 

1 error

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

This can be executed

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

 


2 error

./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
statically from the source with nginx by using --with-pcre=<path> option.

To perform

yum -y install pcre-devel
 

 

If you have an error 3

 

./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.

执行这个

yum -y install openssl openssl-devel

Guess you like

Origin www.cnblogs.com/cxm123123form/p/11481429.html