I a trying to install php on MacOs using homebrew (https://formulae.brew.sh/formula/php), but every time I get the following error:
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.
And when using brew search php I can only find phpstorm and eclipse-php.
How come I can't find or install php on MacOs using homebrew?
Thanks in advance!
Side note: I have already updated homebrew to the latest version and checked the formulae on github, last commit was 6 days ago https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/php.rb.
Posting the answer from https://githubmemory.com/repo/Homebrew/homebrew-core/issues/77629 in case it gets deleted/removed.
All due credits to the original poster. :)
rm -rf $(brew --repo homebrew/core)
brew tap homebrew/core
brew update