You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在MacOS M1 Monterey中为PHP编译Firebird数据库扩展ext-interbase

macOS ARM架构编译PHP 7.4 Firebird扩展报错排查

前置环境

  • 已通过Homebrew安装PHP 7.4
  • 已预装Xcode命令行工具

操作流程

调整编译参数适配MacOS库路径后,执行如下编译命令:

git clone https://github.com/FirebirdSQL/php-firebird.git
cd php-firebird
phpize
CPPFLAGS=-I/Library/Frameworks/Firebird.framework/Headers LDFLAGS=-L/Library/Frameworks/Firebird.framework/Resources/lib ./configure
make

报错信息

执行configure阶段抛出如下错误:

configure: error: libfbclient, libgds or libib_util not found! Check config.log for more information.

查看config.log定位到核心问题提示:

ld: warning: ignoring file /opt/firebird/lib/libib_util.dylib, building for macOS-arm64 but attempting to link with file built for macOS-x86_64

根因结论

Mac平台的Firebird官方安装包仅适配x86_64架构,未提供ARM架构原生支持,动态库架构不匹配导致链接检测失败。

内容的提问来源于stack exchange,提问作者Andre Van Zuydam

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.09.27 03:06:03