rhel 5.8 安装nginx ,执行./configure后,提示./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.
时间: 2023-08-05 10:24:19 浏览: 467
这个错误是因为在编译安装nginx时,没有安装必需的PCRE库。你可以尝试以下步骤解决问题:
1. 安装PCRE库:可以通过yum或apt-get等包管理器来安装PCRE库,具体命令如下:
```
yum install pcre-devel
```
或者
```
apt-get install libpcre3 libpcre3-dev
```
2. 使用--with-pcre选项编译安装:在编译nginx时,使用--with-pcre选项指定PCRE库的路径,例如:
```
./configure --with-pcre=/usr/local/pcre
```
其中,/usr/local/pcre是PCRE库的安装路径,根据实际情况修改即可。
3. 禁用HTTP rewrite模块:如果你不需要HTTP rewrite模块,可以使用--without-http_rewrite_module选项禁用它,例如:
```
./configure --without-http_rewrite_module
```
这样就可以绕过这个错误了。
阅读全文
相关推荐
















