Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
报错
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1` exited with 128.
Error: Failure while executing; `/usr/local/bin/brew tap homebrew/core` exited with 1.
Failed during: /usr/local/bin/brew update --force
解决
//更换有效的镜像地址
lemon@lemonMacBook-Pro ~ % git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 5105, done.
remote: Compressing objects: 100% (4904/4904), done.
remote: Total 5105 (delta 44), reused 886 (delta 5)
Receiving objects: 100% (5105/5105), 4.14 MiB | 1.17 MiB/s, done.
Resolving deltas: 100% (44/44), done.
//前往至 homebrew-core 将其当前的镜像地址也更为有效的地址
lemon@lemonMacBook-Pro ~ % cd "$(brew --repo)"
lemon@lemonMacBook-Pro Homebrew % git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
lemon@lemonMacBook-Pro Homebrew % cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
lemon@lemonMacBook-Pro homebrew-core % git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
//重新执行更新
lemon@lemonMacBook-Pro homebrew-core % brew update
Already up-to-date.
python3
brew install python3
检查是否安装成功及安装位置
lemon@lemondeMacBook-Pro python3
Python 3.9.8 (main, Nov 21 2021, 04:49:21)
[Clang 10.0.1 (clang-1001.0.46.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()
lemon@lemondeMacBook-Pro which python3
/usr/local/bin/python3