1.问题

Mac安装Homebrew的时候报错误fatal: unable to access ‘https://github/Homebrew/brew/’

执行安装命令:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent/Homebrew/install/HEAD/install.sh)"

现象:

zyp@zypdeMacBook-Pro ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password)...
Password:
==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/doc/homebrew
/opt/homebrew/share/man/man1/brew.1
/opt/homebrew/share/zsh/site-functions/_brew
/opt/homebrew/etc/bash_completion.d/brew
/opt/homebrew

Press RETURN/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /usr/sbin/chown -R zyp:admin /opt/homebrew
==> Downloading and installing Homebrew...
fatal: unable to access 'https://github.com/Homebrew/brew/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
Failed during: git fetch --force origin

2. 解决

使用命令:

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

现象:



               开始执行Brew自动安装程序
              [cunkai.wang@foxmail]
           ['2022-04-08 17:04:27']['12.2']
        https://zhuanlan.zhihu.com/p/111014448


请选择一个下载镜像,例如中科大,输入1回车。
源有时候不稳定,如果git克隆报错重新运行脚本选择源。cask非必须,有部分人需要。
1、中科大下载源 2、清华大学下载源 3、北京外国语大学下载源  4、腾讯下载源(不推荐) 5、阿里巴巴下载源(不推荐 缺少cask源)

请输入序号: 2

然后等着。。等着。。中途需要输入几次开机密码

解决参考链接:https://blog.csdn/crist_meng/article/details/122255091

更多推荐

【踩坑】Mac安装Homebrew的时候报错误fatal: unable to access ‘https://github.com/Homebrew/brew