问题:
发现找不到应有的包,并且尝试dockor去诊断提示remote错误。
~ % 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.
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
但是运行修复指令之后在运行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
解决办法:
cd /usr/local/Homebrew/Library/Taps/homebrew/
rm -rf homebrew-core
git clone https://github.com/Homebrew/homebrew-core.git
重新安装一次homebrew-core,完美解决。
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。