如何解决Home Brew 安装包获取无法将 HEAD 解析为修订版
我刚刚安装了最新的 Homebrew,版本为 Homebrew 2.7.3。我在 Mac OS 上预安装了 git,我试图安装 brew install git-crypt
& brew install git-gui
并收到致命错误:无法将 HEAD 解析为修订版。看起来它在任何包上都失败了。
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "git-crypt".
==> 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.
我尝试卸载然后使用他们的命令行重新安装自制软件:https://github.com/homebrew/install#uninstall-homebrew
通过运行 brew doctor,我收到了一些警告:
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed,and which additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew-provided
script of the same name. We found the following "config" scripts:
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3-config
/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8-config
Warning: Some taps are not on the default git origin branch and may not receive
updates. If this is a surprise to you,check out the default branch with:
git -C $(brew --repo homebrew/core) checkout master
我检查了这个目录
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
并意识到没有公式文件夹。
任何帮助将不胜感激。
解决方法
我遇到了这个错误并解决了
git -C $(brew --repo homebrew/core) checkout master
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。