首页 > 系统相关 >Nginx configure error: the HTTP rewrite module requires the PCRE library

Nginx configure error: the HTTP rewrite module requires the PCRE library

时间:2022-11-07 12:44:21浏览次数:64  
标签:PCRE pcre 8.44 HTTP configure library install

Issue

When configure nginx 1.19.0, run the commands.

./configure --prefix=/opt/nginx-1.19.0

But the following error occurs.

checking for PCRE library ... not found
checking for PCRE library in /usr/local/ ... not found
checking for PCRE library in /usr/include/pcre/ ... not found
checking for PCRE library in /usr/pkg/ ... not found
checking for PCRE library in /opt/local/ ... not found

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

Solution

You need to install pcre.

1. Mac OS

Download pcre in the official website http://www.pcre.org/, such as pcre-8.44.zip, and run:

$ unzip pcre-8.44.zip
$ cd pcre-8.44
$ pwd
/Users/cpm/Downloads/packages/pcre-8.44

Copy your unzip path of pcre-8.44.zip, configure nginx again.

./configure --prefix=/opt/nginx-1.19.0 --with-pcre=/Users/cpm/Downloads/packages/pcre-8.44

2. Ubuntu/Debian

  • Use the method from step 1 above.
  • On the https://pkgs.org/search/?q=libpcre webpage, find the libpcre and libpcre-dev packages that match your operating system, download and install.
  • Use the apt-get command.
sudo apt-get install libpcre3-dev

3. RHEL/CentOS

  • Use the method from step 1 above.
  • On the https://pkgs.org/search/?q=pcre webpage, find the pcre and pcre-devel packages that match your operating system, download and install.
  • Use the yum command.
sudo yum install pcre-devel

标签:PCRE,pcre,8.44,HTTP,configure,library,install
From: https://www.cnblogs.com/xzlive/p/16865543.html

相关文章

  • Nginx1.8.1 编译扩展https
    nginx无缝编译扩展https本贴只限用于通过编译安装的nginx,如果用的是yum源安装请卸载后参见 安装nginx部分。一、重新编译nginx1、查看nginx是否支持ssl/usr/local/nginx/sb......
  • HTTP常用返回结果状态码
    摘编自《图解HTTP》HTTP状态码负责表示客户端HTTP请求的返回结果、标记服务器端的处理是否正常、通知出现的错误等工作。状态码的职责是当客户端向服务器端发送请求时,描......
  • 为什么需要http代理
    它的主要作用便是安全的保护用户,它主要工作在开放系统互联(OSI)模型的对话层,起到防火墙的作用。大部分的代理服务器会被用来连接NTERNET(国际互联网)和INTRANET(局域网)。......
  • 编写一个Httpclient调用第三方接口
    什么是httpClientHttpClient是ApacheJakartaCommon下的子项目,可以用来提供高效的、最新的、功能丰富的支持HTTP协议的客户端编程工具包,并且它支持HTTP协议最新的版......
  • web基础与http协议
    一、HTML1.1、html概述HTML叫做超文本标记语言,是一种规范,也是一种标准,它通过标记符号来标记要显示的网页中的各个部分。网页文件本身是一种文本文件,通过在文本文件中添加......
  • https://github.com/aimeos/aimeos-laravel 安装
    需要的安装环境Linux/Unix、WAMP/XAMP或MacOS环境PHP>=7.3(Aimeos2021.10),PHP>=8.0(Aimeos2022.04+)MySQL>=5.7.8,MariaDB>=10.2.2,PostgreSQL9.6+,SQL......
  • HTTP协议
    一、HTML的概述1.1HTML的概念HTML叫做超文本标记语言,是一种规范,也是一种标准,它通过标记符号来标记要显示的网页中的各个部分。网页文件本身是一种文本文件,通过在文本文......
  • Http failure response 0 Unknown error 错误分析
    使用下面这段代码在Angular应用里进行HTTP访问:this.httpClient.get(url).subscribe(response=>{//dosomethingwithresponse},err=>{console.log(err.m......
  • http协议中的Accept和Content-type了解
    转自:https://juejin.cn/post/6923062226941132814,https://www.cnblogs.com/111testing/p/6037579.html1.介绍 Accept代表发送端(客户端)希望接受的数据类型。比如:Accept:t......
  • HTTP/2 简介
    1.二进制分帧层HTTP/2新增了二进制分帧层,在不修改HTTP/1.x的语义(包括各种动词,方法,首部都不受影响)的前提下,将编码方式改变了Connection连接:一个TCP......