Skip to content

Instantly share code, notes, and snippets.

@koriym
Last active February 10, 2021 02:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save koriym/2b744d2b513bf9a3628a36891bbd4d52 to your computer and use it in GitHub Desktop.
Save koriym/2b744d2b513bf9a3628a36891bbd4d52 to your computer and use it in GitHub Desktop.
'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