Fixing the "pcre2.h file not found" error when compiling a PHP PECL extension with brew

Published on 2024-11-29 • Modified on 2024-11-29

This snippet shows how to fix the «pcre2.h file not found» error when compiling a PHP PECL extension with brew. Replace both 10.44 and 8.4.1 with your current PCRE and PHP versions. Originally found on freek.dev 🙏.


brew install pcre2
ln -s/opt/homebrew/Cellar/pcre2/10.44/include/pcre2.h /opt/homebrew/Cellar/php/8.4.1/include/php/ext/pcre/pcre2.h

 More on Stackoverflow  More on the web  Random snippet

  Work with me!


Call to action

Did you like this post? You can help me back in several ways: (use the "reply" link on the right to comment or to contact me )

Thank you for reading! And see you soon on Strangebuzz! 😉

COil

Snippet #strangebuzz 🐝 45/50: www.strangebuzz.com/en/snippets/... #snippets #pcre #php #pecl #brew

[image or embed]

— COil 🐝 (@coil.ooo) 30 novembre 2024 à 13:53