./configure: error: the HTTP rewrite module requires the PCRE libary

错误如下图

这是因为nginx rewrite依赖于pcre这个库所以首先需要安装这个库

1.  下载安装包

  首先去官网下载pcre的安装包

          https://sourceforge.net/projects/pcre/files/pcre/

2.     解压压缩包

  tar -zxvf pcre-8.32.tar.gz

3.     开始操作

  sudo   ./configure

  sudo    make

  sudo    make install

注: 如果第三步有如下的语句时就执行如下操作

  Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library

  这是因为在前面步骤中执行./configuration配置时没有加上对utf-8的支持,

          如果要加上对utf-8的支持可以在./configuration时加上参数: ./configure --enable-utf8 

原文地址:https://www.cnblogs.com/bosha/p/10111312.html