如何修复 Homebrew 的 "No available formula" 警告

How to fix "No available formula" warning for Homebrew

当我开始一个新的终端会话时,我不断得到

Error: No available formula with the name "homebrew/php/php56"
Please tap it and then try again: brew tap homebrew/php

警告。我尝试了 brew tap homebrew/php 但得到了

Error: homebrew/php was deprecated. This tap is now empty as all its formulae were migrated.

此外,尝试了 brew doctorbrew cleanupbrew updatebrew upgrade,但没有成功。有人能解决这个烦人的警告吗?

查看您的 shell(~/.bash_profile~/.zshrc 或类似)的配置文件并删除有问题的项目。

就我而言,我在 export PATH 行中仍然引用了它。从该行中删除 $(brew --prefix homebrew/php/php56)/bin 应该会在启动时清除这些警告。

你可以试试

$ brew install php72