If you're getting the following error after running pecl install imagick
:
/opt/homebrew/Cellar/php@7.4/7.4.22/include/php/ext/pcre/php_pcre.h:25:10: fatal error: 'pcre2.h' file not found
#include "pcre2.h"
^~~~~~~~~
1 error generated.
make: *** [imagick.lo] Error 1
ERROR: `make' failed
- Make sure pcre2 is installed:
brew install pcre2
- Manually copy missing header file:
cp /opt/homebrew/Cellar/pcre2/VERSION/include/pcre2.h /opt/homebrew/Cellar/php@VERSION/VERSION/include/php/ext/pcre
- Rerun
pecl install imagick