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

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...