环境:macos Catalina 10.15.7
brew install --build-from-source python@3.9
报错:
Error: No such file or directory @ rb_sysopen - /Users/a798/Library/Caches/Homebrew/downloads/c7107fd78b76397dc0b529f2e835d040e6e5f1964a50c334b526f31cfc60cf55--gdbm-1.23.catalina.bottle.tar.gz
按照下面方式更新brew源:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
brew update
再执行
brew install --build-from-source python@3.9
You can save space and time by running:
brew untap homebrew/cask
重新安装homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
报错:
Failed to connect to raw.githubusercontent.com port 443: Connection refused
Error: pyenv: Failed to download resource "autoconf.rb"
Download failed: https://raw.githubusercontent.com/Homebrew/homebrew-core/9938e8dc51573cbbca3c73eaa11b1234d810b354/Formula/a/autoconf.rb
解决方案:
hosts文件中添加如下映射:
199.232.96.133 raw.githubusercontent.com