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
libpcreandlibpcre-devpackages that match your operating system, download and install. - Use the
apt-getcommand.
3. RHEL/CentOS
- Use the method from step 1 above.
- On the https://pkgs.org/search/?q=pcre webpage, find the
pcreandpcre-develpackages that match your operating system, download and install. - Use the
yumcommand.

浙公网安备 33010602011771号