安装nginx出错the HTTP rewrite module requires the PCRE library


问题描述

报错信息如下所示:

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

原因

缺少pcrepcre-devel

解决

首先安装pcrepcre-devel,rpm安装的时候注意依赖关系。

如果在安装以后还出现报错的情况,则使用命令指定pcre的源码路径进行安装。

 ./configure --prefix=/usr/local/nginx --with-pcre=/usr/local/pcre
  • --prefix:选择nginx要安装的目录
  • --with-pcre:选择pcre的源码所在目录


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM