且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在macOS Catalina或Big Sur上的PHP 7.4上安装OCI8扩展?

更新时间:2023-01-14 22:23:02

我个人将安装新的经过公证的macOS Oracle中的步骤即时客户端软件包使安装更容易.安装 Basic 和 SDK 包 - 如果您也需要,也可以安装 SQL*Plus.在PECL提示符下输入的路径将是/Users/yourname/Downloads/instanclient_19_8,但如果要将目录放置在其他位置,则可以将其移动.

Personally I'd install the new Instant Client 19.8 DMGs from Oracle. The download page and the packages contain instructions. Also see the steps at Notarized macOS Oracle Instant Client Packages Make Installation Easier. Install the Basic and SDK packages - and maybe SQL*Plus if you want that too. The path you would give at the PECL prompt will be /Users/yourname/Downloads/instanclient_19_8 but you can move that directory if you want to put it somewhere else.

可能是brew软件包将头文件放在OCI8安装脚本不知道的位置.通过使用DMG,可以找到标题.

It could be that the brew packages are putting the header files in a place that the OCI8 install script isn't aware. By using the DMGs, the headers will be found.