php - 在 OSX 上将 IMAP 添加到 PHP 7.2
问题描述
我在 OS X El Capitan 上使用 PHP 7.2,使用 Homebrew 安装(当然)。现在我想使用 PHP 的 IMAP 扩展中的一些 IMAP 函数,但是无论我搜索什么,我都找不到在 OSX 上添加扩展的方法。
我尝试过的一些事情......当然,我尝试了最常用的方法:
$ brew reinstall php --with-imap
然而这失败了,返回:
Warning: php: this formula has no --with-imap option so it will be ignored!
我发现顺便提到的另一种方法也失败了:
$ brew install php72-imap
Error: No available formula with the name "php72-imap"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
我不确定该朝哪个方向发展。我确信有一种简单的、可能有记录的方法可以做到这一点,但我还没有找到。也许我只是在错误的地方寻找并使用错误的搜索词......
解决方案
Kevin Abel提供了一些从Homebrew/core中删除的 PHP 扩展。您可以通过以下方式安装 IMAP 扩展:
brew tap kabel/php-ext
brew install php-imap
要安装特定版本,例如 7.2,请使用:
brew install php@7.2-imap
推荐阅读
- react-native - React Native - 网络请求失败
- javascript - Javascript随机文本随机生成
- android - 检测到单点触控时模拟多点触控
- android - 使用 gson 的 JSON 到 Java 对象
- php - 如果函数为空,则隐藏 DIV
- discord - Discord 角色的在线用户数
- xamarin.forms - 在向网格添加子项时锁定网格上的视觉更新
- pointers - 在 Go 中检查字符串指针的长度
- ios - SIGABRT 错误:Interface Builder 文件中的未知类 _TtC11Foodtracker14ViewController
- python - 两个 linux 之间自动、持续和实时的数据发送