Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
'pcre2.h' file not found on Mac Big Sur with PHP 8?
/opt/homebrew/Cellar/php/8.0.2/include/php/ext/pcre/php_pcre.h:23:10: fatal error: 
      'pcre2.h' file not found
#include "pcre2.h"
1 error generated.

To fix this issue, Symlink pcre2.h manually.

ln -s /opt/homebrew/opt/pcre2/include/pcre2.h /opt/homebrew/opt/php@8.0/include/php/ext/pcre/pcre2.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment