Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

pcre2.h missing on Brew PHP setups

已關閉
#760 0 則留言 0 個 reaction 已指派 1 人 在 GitHub 檢視

維護者通常 1 天內回覆

@asgrim 已經在處理了。

開始於 2026年10月6日。

評估

這個 Issue 還沒有評估資料。

描述

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
主要語言
PHP
星號
2k
分支
75
平均合併
19 小時
30 天內合併 PR
16

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

php/pie 的其他 Issue

查看 php/pie 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。