Source Package linux installation error

Code 1 given below:

[root@xiaoming nginx-1.17.7]# ./configure --prefix=/soft/nginx-1.17.7
checking for OS
 + Linux 3.10.0-1062.el7.x86_64 x86_64
checking for C compiler ... not found

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

Solution:

 Source compiler package uses linux system compiler, source packages are typically developed using C language, here suggested that the lack c language compiler, just use yum repository to install gcc package

yum install -y gcc 

2 code is given as follows:

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

Solution:

Pcre library file is missing

yum install -y pcre-devel

3 error codes:

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

Solution:

With code 2, same as missing the zlib library file, as long as we can install zlib-devel

yum install -y zlib-devel

Guess you like

Origin www.cnblogs.com/xmtxh/p/12134671.html