无法在 macOS 上使用 Homebrew 安装 PHP

Nic*_*ick 3 php macos homebrew

我尝试使用 Homebrew ( https://formulae.brew.sh/formula/php ) 在 macOS 上安装 PHP,但每次都会出现以下错误:

Warning: No available formula or cask with the name "php".
==> 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.
Run Code Online (Sandbox Code Playgroud)

使用时brew search php我只能找到phpstorm和eclipse-php。为什么我无法使用 Homebrew 在 macOS 上找到或安装 PHP?提前致谢!

旁注:我已经将 Homebrew 更新到最新版本并在 GitHub 上检查了公式,上次提交是 6 天前https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/php.rb

OMi*_*hah 10

从https://githubmemory.com/repo/Homebrew/homebrew-core/issues/77629发布答案,以防它被删除/删除。

你的核心龙头不见了。做:

rm -rf $(brew --repo homebrew/core)
brew tap homebrew/core
brew update
Run Code Online (Sandbox Code Playgroud)

所有应得的功劳归于原始海报。:)