问题的症状如下:
~ % 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.无论我尝试安装什么,都找不到它。所以我运行了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紧接着是
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/homebrew-core
,然后再次运行brew doctor,并获得
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所以我运行了命令git -C "/usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew
然后再次运行brew doctor并获得第一个结果。
对可能的错误有什么想法吗?
发布于 2021-01-31 23:53:19
我在全新安装自制软件时也遇到了上述错误。我执行了以下操作,并修复了警告:
cd /usr/local/Homebrew/Library/Taps/homebrew/
rm -rf homebrew-core
git clone https://github.com/Homebrew/homebrew-core.git现在brew doctor给出了Your system is ready to brew。
希望这也适用于你!
https://stackoverflow.com/questions/65963289
复制相似问题