The symptom of the problem is the following:
~ % brew install htop
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> Updated Casks
Updated 2 casks.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "htop".
==> 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.
No matter what I try to install it can't find it. So I ran brew doctor
Warning: Suspicious https://github.com/Homebrew/homebrew-core git origin remote found.
The current git origin is:
https://github.com/Homebrew/brew
With a non-standard origin, Homebrew won't update properly.
You can solve this by setting the origin remote:
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/homebrew-core
Followed by
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/homebrew-core
and then ran brew doctor again and got
Warning: Suspicious https://github.com/Homebrew/brew git origin remote found.
The current git origin is:
https://github.com/Homebrew/homebrew-core
With a non-standard origin, Homebrew won't update properly.
You can solve this by setting the origin remote:
git -C "/usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew
and so I ran the command git -C "/usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew
and then ran brew doctor again and got the first results.
Any thoughts on what could be wrong?
I also encountered the above error on a fresh install of homebrew. I did the following and it fixed the warning:
cd /usr/local/Homebrew/Library/Taps/homebrew/
rm -rf homebrew-core
git clone https://github.com/Homebrew/homebrew-core.git
And now brew doctor
now gives Your system is ready to brew
.
Hope this works for you too!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With