Nginx configure error: the HTTP rewrite module requires the PCRE library
Issue
When configure nginx 1.19.0, run the commands.
But the following error occurs.
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:
Copy your unzip path of pcre-8.44.zip
, configure nginx again.
2. Ubuntu/Debian
- Use the method from step 1 above.
- On the https://pkgs.org/search/?q=libpcre webpage, find the
libpcre
andlibpcre-dev
packages that match your operating system, download and install. - Use the
apt-get
command.
3. RHEL/CentOS
- Use the method from step 1 above.
- On the https://pkgs.org/search/?q=pcre webpage, find the
pcre
andpcre-devel
packages that match your operating system, download and install. - Use the
yum
command.