linux安装./configure --prefix=/usr/local/nginx报错:
报错1:
./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=
查看网上解决方法:
安装pcre-devel解决问题
yum -y install pcre-devel
报错2:
./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=
等等可能是因为缺少库导致的,所以我们需要安装前置库:
yum install -y gcc pcre pcre-devel openssl openssl-devel gd gd-devel
然后再次重新编译安装nginx.

本文详细介绍了在Linux环境下配置nginx时遇到的常见错误及其解决方案,特别是关于HTTP rewrite模块和HTTP gzip模块因缺少PCRE库和zlib库而引发的问题。通过安装必要的库文件,如pcre-devel和zlib,可以有效解决这些错误,确保nginx的顺利编译和安装。
3124

被折叠的 条评论
为什么被折叠?



