Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

pcre2.h missing on Brew PHP setups

Chiusa
#760 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@asgrim ci sta già lavorando.

Dal 6/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

bug bug-confirmed maintainer investigating

What are you trying to do?

pie install apcu/apcu (or other packages that need pcre2.h)

What platform, and PIE version are you using?

on an OSX Apple Silicon, with PHP from Homebrew

Steps to reproduce the issue

pie install apcu/apcu

What do you expect to happen?

it should install

What is actually happening

In file included from /Users/james/.pie/php8.5_458f49e988810d5486f8103219b4e19c/vendor/apcu/apcu/apc_iterator.h:26:
/opt/homebrew/Cellar/php/8.5.11/include/php/ext/pcre/php_pcre.h:23:10: fatal error: 'pcre2.h' file not found
   23 | #include "pcre2.h"
      |          ^~~~~~~~~
1 error generated.

Anything else?

Brew uses the system PCRE2 library rather than PHP's, so compiler can't find the header.

Workaround:

CPATH=/opt/homebrew/include pie install apcu/apcu

Options:

  • Detect if external PCRE is used, and pass the appropriate build flags using pkg-config --cflags libpcre2-8 or similar.
  • Detect Homebrew (buildProvider()) and add the include directory
Lingua principale
PHP
Stelle
2k
Fork
75
Merge medio
19h
PR unite (30g)
16

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di php/pie

Tutte le issue di php/pie

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.