macOS 安装homebrew
作者:互联网
打开官方链接homebrew
# 安装命令
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# 上述命令在安装过程中,会出现超时,链接不到github的问题
curl: (7) Failed to connect to http://raw.githubusercontent.com port 443: Operation timed out
# 解决方案是,把安装的shell脚本下载下来安装
git clone https://github.com/Homebrew/install.git
# 进入目录并执行安装脚步
cd install && /bin/bash install.sh
# 在安装过程中可能会出现
fatal: unable to access 'https://github.com/Homebrew/homebrew-core.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443
# 把home-core的包下载下来
cd "$(brew --repo)/Library/Taps/"
mkdir Homebrew && cd Homebrew
git clone git://mirrors.ustc.edu.cn/homebrew-core.git
# 执行更新命令
brew update
Error:
homebrew-core is a shallow clone.
To `brew update`, first run:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
This command may take a few minutes to run due to the large size of the repository.
# 提示需要先执行如下命令
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
# 在执行更新命令
brew update
标签:core,macOS,git,com,install,Homebrew,homebrew,安装 来源: https://www.cnblogs.com/simple-record/p/16607099.html