【问题标题】:Returns an error when updating my Homebrew更新我的 Homebrew 时返回错误
【发布时间】:2020-10-30 08:10:57
【问题描述】:

我正在尝试使用 brew update 更新我的 Homebrew,但它返回以下错误:

fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Error: Fetching /usr/local/Homebrew/Library/Taps/jonj/homebrew-old-openssl failed!
fatal: 'origin/master' is not a commit and a branch 'master' cannot be created from it
fatal: invalid upstream 'origin/master'

【问题讨论】:

  • jonj 你的 GitHub 帐户有没有机会?它似乎没有那个 repo,你已经挖掘了一些不再存在的东西(jonj/old-openssl,参见例如stackoverflow.com/a/63533627/3001761)。尝试运行brew doctor
  • @jonrsharpe 对不起,我是自制软件的新手。当我运行brew doctor 时,我得到了这个结果:Warning: Unbrewed header files were found in /usr/local/include. If you didn't put them there on purpose they could cause problems when building Homebrew formulae, and may need to be deleted.
  • @jonrsharpe 我可以删除所有点击的内容吗?
  • @jonrsharpe 只是尝试使用不同版本的 PHP,但由于某种原因,在尝试了所有研究结果之后,仍然很不幸得到了完美的答案。现在,我最终得到了自制错误
  • 你可以用brew untap jonj/old-openssl取消点击那个(大概)被删除的,见docs.brew.sh/Taps

标签: git homebrew


【解决方案1】:
Error: Fetching /usr/local/Homebrew/Library/Taps/jonj/homebrew-old-openssl failed!

当你 brew tap <user>/<repo> 时,Homebrew 默认克隆 github.com/<user>/homebrew-<repo> 到你的 Taps 目录中,参见例如the docs, Is there a special meaning of the / (slash) in the name of the brew? Or is it just a slash as a string?

在这种情况下,您在某些时候执行了 brew tap jonj/old-openssl,但 that repo 不再公开存在(当前为 404)。要删除它,您可以运行brew untap jonj/old-openssl

【讨论】:

  • 当我尝试在本地取消它时,它给了我一个错误:Error: Refusing to untap zifnab/old-openssl because it contains the following installed formulae or casks: openssl@1.0.2t
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-06-19
  • 1970-01-01
  • 2018-10-21
相关资源
最近更新 更多