繁体   English   中英

更新我的 Homebrew 时返回错误

[英]Returns an error when updating my Homebrew

我正在尝试使用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'
Error: Fetching /usr/local/Homebrew/Library/Taps/jonj/homebrew-old-openssl failed!

当您brew tap <user>/<repo>时,Homebrew 默认将克隆github.com/<user>/homebrew-<repo>到您的Taps目录中,参见例如文档/(斜杠)是否有特殊含义) 以酿造的名义? 或者它只是作为字符串的斜线?

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

这意味着您有部分安装的 brew 安装

  1. 运行这些命令

    ls -la /opt/homebrew

    ls -la/opt/homebrew/bin

  2. 如果这些给出输出,请删除 /opt/ 文件夹

  3. 然后尝试运行

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh )"

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM