Mac 出现brew command not found的解决办法

1.  Mac 出现brew command not found的解决办法

安装homebrew

1.1 第一种安装方法

在终端输入命令安装brew

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

如若出现:

curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

说明该网址http://raw.githubusercontent.com/ 被墙了,无法访问。

(1)第一种解决方法:设置mac的DNS为114.114.114.114或者8.8.8.8

设置DMS方法:https://jingyan.baidu.com/article/4dc40848081204c8d946f184.html

(2)第二种解决方法:gitee的自动脚本(经安装过brew的请自行备份后,再运行下面的安装脚本!)

安装脚本命令为:

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

按照要求进行填写即可。

注:如若要卸载该脚本安装的brew,命令为:

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"

1.2 其他安装方法

传送门:https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/ | https://www.cnblogs.com/hyh123/p/14336584.html

 

参考文献:https://zhuanlan.zhihu.com/p/111014448http://www.chenxm.cc/article/1071.html

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值