Mac M1 Brew install 报错Command failed with exit 128:git

问题:

记录一个问题,原因是今天使用Mac上面的Brew安装一个Redis发生了错误,我也是头一次使用Brew。
理论上来说使用brew安装出现这种Error都是可以解决的!

具体如图所示,执行brew install redis报错Command failed with exit 128:git

解决方式:

输入brew -v后会提示你执行两个配置命令,直接复制执行就ok了!

git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
Homebrew/homebrew-cask

git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
Homebrew/homebrew-core

具体如下图所示!
在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/qq_25404477/article/details/126102189