【发布时间】:2021-05-03 21:26:22
【问题描述】:
问题的症状如下:
~ % 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 并得到第一个结果。
对可能出现的问题有什么想法吗?
【问题讨论】: