pcre2.h missing on Brew PHP setups
維護者通常 1 天內回覆
@asgrim 已經在處理了。
開始於 2026年10月6日。
評估
這個 Issue 還沒有評估資料。
描述
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-8or similar. - Detect Homebrew (
buildProvider()) and add the include directory
- 主要語言
- PHP
- 星號
- 2k
- 分支
- 75
- 平均合併
- 19 小時
- 30 天內合併 PR
- 16
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
php/pie 的其他 Issue
-
Do not duplicate an ext in pie show output for dev versions可能已有人在做 @asgrim 於 11 天前認領。 未關閉enhancement maintainer investigating
維護者通常 1 天內回覆
-
Add self-update feature for executable PIEs可能已有人在做 @asgrim 於 22 天前認領。 未關閉enhancement maintainer investigating
維護者通常 1 天內回覆
-
Allow building from existing sources on disk可能已有人在做 @asgrim 於 22 天前認領。 未關閉enhancement maintainer investigating
php/pie#738 · 2 則留言 · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Optionally remove build-only dependencies and bloat after install可能重新可做 @asgrim 於 143 天前認領,目前沒有進行中的 PR。 未關閉enhancement maintainer investigating
php/pie#618 · 2 則留言 · 4 個 reaction · 已指派 1 人 ·
維護者通常 1 天內回覆
-
Display number of downloads/stars when results are shown可能重新可做 @asgrim 於 170 天前認領,目前沒有進行中的 PR。 未關閉enhancement maintainer investigating
php/pie#592 · 1 則留言 · 1 個 reaction · 已指派 1 人 ·
維護者通常 1 天內回覆
相似的 Issue
-
bug code quality
難度 2/5 1-3 小時 新手友好度 72/100
SemanticMediaWiki/SemanticMediaWiki#7149 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 82/100
-
難度 2/5 1-3 小時 新手友好度 65/100
google/site-kit-wp#13825 ·
維護者通常 3 天內回覆
-
Made by AI module: MCP type: bug
難度 2/5 1-3 小時 新手友好度 76/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100