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
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 )
- Report any error/typo.
- Report something that could be improved.
- Like and repost!
- Follow me on Bluesky 🦋
- Subscribe to the RSS feed.
- Click on the More on Stackoverflow buttons to make me win "Announcer" badges 🏅.
Thank you for reading! And see you soon on Strangebuzz! 😉
Snippet #strangebuzz 🐝 45/50: www.strangebuzz.com/en/snippets/... #snippets #pcre #php #pecl #brew
— COil 🐝 (@coil.ooo) 30 novembre 2024 à 13:53
[image or embed]