Home > Net >  How to install APCu with PHP 7.4
How to install APCu with PHP 7.4

Time:01-17

I installed php 7.4 onto OSX 12.1 onto a MacBook with Apple M1 Max Chip.

I followed this instruction: https://getgrav.org/blog/macos-monterey-apache-mysql-vhost-apc

Now I try to install APCu. But I get this error message:

In file included from /private/tmp/pear/temp/apcu/php_apc.c:34: In file included from /private/tmp/pear/temp/apcu/apc_iterator.h:26: /opt/homebrew/Cellar/[email protected]/7.4.27/include/php/ext/pcre/php_pcre.h:25:10: fatal error: 'pcre2.h' file not found #include "pcre2.h" ^~~~~~~~~ 1 error generated. make: *** [php_apc.lo] Error 1 ERROR: `make' failed

How can I fix that problem?

Thanks for help.

CodePudding user response:

I find the problem. Brew installed pcre2 to another directory. I copied the file with this command, and then it worked:

cp /opt/homebrew/Cellar/pcre2/10.39/include/pcre2.h /opt/homebrew/Cellar/[email protected]/7.4.27/include/php/ext/pcre/

  •  Tags:  
  • Related