Mac brew update出问题

本文记录了使用brew安装软件时遇到的问题及解决方法,包括警告信息的处理与SSL连接失败的解决方案,通过更换镜像源成功解决问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

问题

在使用brew 安装软件时出现以下问题,最后通过更新homebrew镜像源,brew update成功后,安装软件成功,以下针对这些问题做些记录。
一、Warning: Calling sha256 "digest" => :tag in a bottle block is deprecated!
二、LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

解决方案

针对问题一

git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
brew style --fix /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula

针对问题二

执行brew update 出现LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443问题

解决:更换brew源

git -C “$(brew --repo)” remote set-url origin https://mirrors.ustc.edu.cn/brew.git

git -C “$(brew --repo homebrew/core)” remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

git -C “$(brew --repo homebrew/cask)” remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

if [ $SHELL = “/bin/bash” ] # 如果你的是bash
then
echo ‘export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles/’ >> ~/.bash_profile
source ~/.bash_profile
elif [ $SHELL = “/bin/zsh” ] # 如果用的shell 是zsh 的话
then
echo ‘export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles/’ >> ~/.zshrc
source ~/.zshrc
fi

brew update

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值