可疑https://github.com/Homebrew/brewgitorigin远程发现

问题的症状如下:

 ~ % 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 并得到了第一个结果。

关于可能出什么问题的任何想法?

回答

我在全新安装自制软件时也遇到了上述错误。我执行了以下操作并修复了警告:

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://github.com/Homebrew/brewgitorigin远程发现的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>