ubuntu报错./configure: error: the HTTP rewrite module requires the PCRE library.

这个错误提示表明在编译安装 Nginx 时缺少 PCRE(Perl Compatible Regular Expressions)库。为了解决这个问题,你需要安装 PCRE 库及其开发包。

请按照以下步骤进行操作:

  1. 打开终端,并输入以下命令更新软件包列表:
   sudo apt update
  1. 安装 PCRE 库和开发包:
   sudo apt install libpcre3 libpcre3-dev

这将安装 PCRE 库及其开发文件。

  1. 安装完成后,重新运行 ./configure 命令编译 Nginx。 注意:如果你已经在编译过程中运行了 ./configure 命令,请先运行 make clean 清除之前的编译结果,然后再重新运行 ./configure

如果一切顺利,你应该不再遇到 PCRE 相关的错误,并可以成功编译安装 Nginx。

发表评论

后才能评论