【问题标题】:Error when install PHP with brew in OS Monterey在 OS Monterey 中使用 brew 安装 PHP 时出错
【发布时间】:2021-12-20 12:41:05
【问题描述】:

我在 OS Monterey 中删除了 php,所以我尝试通过 Homebrew 安装它

我已经安装 Homebrew,更新 tap 到 shivammathur/php 并使用这个命令

brew install shivammathur/php/php@7.4

但我得到了这个响应代码

fatal: Could not resolve HEAD to a revision
Warning: No available formula with the name "httpd" (dependency of shivammathur/php/php@7.4).
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.

当我使用 brew --version 检查 brew 版本时,我得到了这个信息

Homebrew 3.3.2
Homebrew/homebrew-core (no Git repository)
Homebrew/homebrew-cask (git revision 5c43c2133d; last commit 2021-11-06)

没有 Git 存储库 问题是否与我无法在我的设备中安装 php 相关?如何解决这个问题

我需要这个来安装composer和安装Laravel,所以安装XAMPP我认为现在还不清楚

谢谢

【问题讨论】:

标签: php homebrew macos-monterey


【解决方案1】:

由于brew --version 的输出显示homebrew-core 存储库丢失,这就是brew 无法找到httpd 的原因。

Homebrew/homebrew-core (no Git repository)

请点按核心存储库,然后重试。

brew tap homebrew/core

【讨论】:

    猜你喜欢
    • 2023-02-10
    • 2015-02-05
    • 1970-01-01
    • 2012-08-05
    • 1970-01-01
    • 2022-08-18
    • 2022-01-09
    • 2015-11-14
    • 1970-01-01
    相关资源
    最近更新 更多