在OSX上将IMAP添加到PHP 7.2

编程入门 行业动态 更新时间:2024-10-27 02:24:04
本文介绍了在OSX上将IMAP添加到PHP 7.2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在OS X El Capitan上使用PHP 7.2,当然是使用Homebrew安装的.现在,我想使用PHP的IMAP扩展中的一些IMAP函数,但是无论我要搜索什么,我都找不到在OSX上添加扩展的方法.

I'm using PHP 7.2 on OS X El Capitan, installed using Homebrew (of course). Now I'd like to use some IMAP functions from PHP's IMAP extension, but no matter what I search for, I can't find a way to add the extension on OSX.

我尝试过的一些方法……当然,我尝试了最常用的方法:

Some things I've tried... I have, of course, tried the most commonly recommended approach:

$ brew reinstall php --with-imap

但是这失败了,返回:

Warning: php: this formula has no --with-imap option so it will be ignored!

我发现顺便提到的另一种方法也失败了:

Another method, which I found mentioned in passing, also fails:

$ 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.

我不确定该朝哪个方向前进.我敢肯定有一种简单的方法(可能已记录在案),但是我还没有找到它.也许我只是在错误的地方寻找并使用了错误的搜索字词...

I'm not exactly sure which direction to go in with this. I'm sure there's an easy, probably documented, way of doing this, but I am yet to find it. Perhaps I'm just looking in the wrong places and using the wrong search terms...

推荐答案

凯文·阿贝尔提供了一些已从 Homebrew/core 中删除了PHP扩展.您可以使用以下命令安装IMAP扩展程序:

Kevin Abel is providing some of the PHP extensions removed from Homebrew/core. You can install the IMAP extension with:

brew tap kabel/php-ext brew install php-imap

要安装特定版本(例如7.2),请使用:

To install a specific version, such as 7.2 use:

brew install php-ext/php@7.2-imap

更多推荐

在OSX上将IMAP添加到PHP 7.2

本文发布于:2023-10-26 11:05:02,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1529950.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:上将   OSX   IMAP   PHP

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!