I try to install openswoole
on my mac machine. I have this issue when installing it.
/usr/local/Cellar/[email protected]/7.4.29/include/php/ext/pcre/php_pcre.h:25:10: fatal error: pcre2.h: No such file or directory
#include "pcre2.h"
I used the command brew install pcre
to fix this issue as others recommend, but I always get the same result. I try to open the folder pcre
I only see one php_pcre.h
file inside it.
Here's simplest solution. I have finally solved my problem. I used PHP 8.1.7 - Mac Pro 2022 - Apple Silicon (M1)
My errors: fatal error: 'pcre2.h' file not found
The solution that I used:
brew install pcre2
ln -s /opt/homebrew/opt/pcre2/include/pcre2.h /opt/homebrew/opt/[email protected]/include/php/ext/pcre/
Beware of the PHP version in the destination, adjust as-needed. Then, re-run the installation that failed, e.g. apcu or openswoole.
pecl install ...
Success Installation:
try:
sudo ln -s /opt/local/include/pcre.h /usr/include/ "replace your file location here"
sudo pecl install apc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With