Homebrew 重装
NodeJS V18 发布了,想更新尝鲜,但是 Homebrew 检测不到 v18,尝试换源之后仍然不行,最后重装解决,作此记录。
卸载
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
报错及解决
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
开启魔法工具,临时修改终端 Proxy。(终端重启之后会失效)
# 7890 和 7891 需要换成魔法工具的端口
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7891
再次卸载可成功,
重新安装
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"