Homebrew执行命令时出错的解决方案

Admin@ACs-MacBook-Pro ~ % brew install git
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "git".
==> 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.

在尝试安装git时出现这样的问题。
解决方案:
1.尝试重新安装Homebrew
执行以下这两条命令

Admin@ACs-MacBook-Pro ~ % rm -rf /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
Admin@ACs-MacBook-Pro ~ % brew update

2.在仍然失败时,尝试更换节点
例如我重新安装时,也失败了,然后换了个服务器就不报错了。

Admin@ACs-MacBook-Pro ~ % brew install git
Updating Homebrew...
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 
Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --origin=origin` exited with 128.
Error: Failure while executing; `/usr/local/bin/brew tap homebrew/core` exited with 1.
Admin@ACs-MacBook-Pro ~ % brew install git
Updating Homebrew...
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 942778, done.
remote: Counting objects: 100% (186/186), done.
remote: Compressing objects: 100% (83/83), done.
remote: Total 942778 (delta 110), reused 176 (delta 103), pack-reused 942592
Receiving objects: 100% (942778/942778), 375.38 MiB | 2.29 MiB/s, done.
Resolving deltas: 100% (640801/640801), done.
Tapped 2 commands and 5564 formulae (5,884 files, 411.8MB).
==> Downloading https://ghcr.io/v2/homebrew/core/gettext/manifests/0.21
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/gettext/blobs/sha256:a025e143fe3f5f7e24a936b8b0a4926acfdd025b11d62024e3d355
==> Downloading from https://pkg-containers-az.githubusercontent.com/ghcr1/blobs/sha256:a025e143fe3f5f7e24a936b8b0a4926acfdd
##############                                                            20.0%
(这样就正常开始启动安装程式了)
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值