问题:
发现找不到应有的包,并且尝试dockor去诊断提醒remote谬误。
~ % brew install htopUpdating Homebrew...==> Auto-updated Homebrew!Updated 1 tap (homebrew/cask).==> Updated CasksUpdated 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/brewWith 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-coreWith 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-coregit clone https://github.com/Homebrew/homebrew-core.git
重新安装一次homebrew-core,完满解决。