MacOS命令行安装telnet,
brew install telnet
安装失败,错误提示:
curl: (35) LibreSSL SSL_connect: Connection reset by peer in connection to github.com:443
无论是科学上网还是更改hosts文件都无法解决。尝试更改brew国内源终于可以。
brew换源
第一步,替换brew.git
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
第二步:替换homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
第三步:替换homebrew-cask默认源
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask"
git remote set-url origin git://mirrors.ustc.edu.cn/homebrew-cask.git
第四步:替换homebrew-bottle默认源
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bashrc
source ~/.bashrc
最后使用
brew update --verbose