Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

pcre2.h missing on Brew PHP setups

Đã đóng
#760 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@asgrim đang làm issue này rồi.

Từ ngày 6/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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
Ngôn ngữ chính
PHP
Star
2k
Fork
75
Merge trung bình
19 giờ
Pull request đã merge (30 ngày)
16

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của php/pie

Tất cả issue của php/pie

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.