brew install mysql 提示Error: Command failed with exit 128: git 解决方案

未找到解决原因,网上说的更换一下git地址啥的,下载直接都是龟速,受不了,干脆从新下

1、暴力卸载
sudo rm -rf /usr/local/.git
rm -rf ~/Library/Caches/Homebrew
rm -rf /usr/local/Homebrew

2、从新安装
从新安装也遇到了一些问题还是地址打不开这类的,我用的这个网址的方法,瞬间ok了

先把host文件加上这些映射可以让更新下载速度起飞
# GitHub Start
52.74.223.119     github.com
52.74.223.119   gist.github.com
54.169.195.247   api.github.com
185.199.111.153   assets-cdn.github.com
199.232.96.133    raw.githubusercontent.com
199.232.96.133    gist.githubusercontent.com
199.232.96.133    cloud.githubusercontent.com
199.232.96.133   camo.githubusercontent.com
199.232.96.133   avatars0.githubusercontent.com
199.232.96.133    avatars1.githubusercontent.com
199.232.96.133   avatars2.githubusercontent.com
199.232.96.133    avatars3.githubusercontent.com
199.232.96.133    avatars4.githubusercontent.com
199.232.96.133    avatars5.githubusercontent.com
199.232.96.133    avatars6.githubusercontent.com
199.232.96.133    avatars7.githubusercontent.com
199.232.96.133    avatars8.githubusercontent.com
199.232.96.133  user-images.githubusercontent.com
185.199.109.154   github.githubassets.com
# GitHub End

3、下载brew

/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh)"

brew install mysql 提示Error: Command failed with exit 128: git 解决方案_第1张图片

这速度,不用安全上网也能起飞。

brew install mysql 提示Error: Command failed with exit 128: git 解决方案_第2张图片 brew install mysql 提示Error: Command failed with exit 128: git 解决方案_第3张图片

可以了

 

你可能感兴趣的:(MAC,brew,git)