mac下Homebrew安装Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed报错解决方法

在安装 Homebrew 时发现了如下报错

Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask failed!
fatal: Could not resolve HEAD to a revision
Failed during: /usr/local/bin/brew update --force --quiet

尝试了一些方法都没解决,最后采用如下方法完美解决。

1、卸载之前安装的 Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

2、安装新的 Homebrew

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/Homebr
Error: node: Failed to download resource "cmake.rb" Download failed: https://raw.githubusercontent.com/Homebrew/homebrew-core/7bc1799a07a009c7a24cb160e79e3944659f8e1e/Formula/c/cmake.rb k@ks-MacBook-Air ~ % brew install cmake Warning: Treating cmake as a formula. For the cask, use homebrew/cask/cmake or specify the `--cask` flag. To silence this message, use the `--formula` flag. Warning: You are using macOS 11. We (and Apple) do not provide support for this old version. It is expected behaviour that some formulae will fail to build in this old version. It is expected behaviour that Homebrew will be buggy and slow. Do not create any issues about this on Homebrew's GitHub repositories. Do not create any issues even if you think this message is unrelated. Any opened issues will be immediately closed without response. Do not ask for help from Homebrew or its maintainers on social media. You may ask for help in Homebrew's discussions but are unlikely to receive a response. Try to figure out the problem yourself and submit a fix as a pull request. We will review it but may or may not accept it. ==> Fetching cmake ==> Downloading https://raw.githubusercontent.com/Homebrew/homebrew-core/7bc1799 curl: (7) Failed to connect to raw.githubusercontent.com port 443 after 4 ms: Couldn't connect to server Error: cmake: Failed to download resource "cmake.rb" Download failed: https://raw.githubusercontent.com/Homebrew/homebrew-core/7bc1799a07a009c7a24cb160e79e3944659f8e1e/Formula/c/cmake.rb k@ks-MacBook-Air ~ %
03-13
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值