mac安裝brew


問題描述

執行brew官網命令安裝brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

第一次還行有進度

Last login: Thu Sep 24 22:58:25 on ttys000
bogon:~ GZ$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
bogon:~ GZ$
bogon:~ GZ$
bogon:~ GZ$
bogon:~ GZ$
bogon:~ GZ$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
Failed to locate Homebrew!
bogon:~ GZ$
bogon:~ GZ$

但是一直停留在上面代碼的界面

終止,又重新執行命令要么沒反應要么如下

Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in
Bash. Please migrate to the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

在網上搜了很多brew安裝方式,但是基本也是這樣的報錯

Failed to connect to raw.githubusercontent.com port 443: Connection refused

解決方案

知乎看到一個大佬放上一條命令,直接解決了這一系列問題,可以下載。很感謝這位大佬,不多說直接上命令: 自動腳本(全部國內地址)(在Mac os終端中復制粘貼回車下面這句話)

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

參考

  1. Homebrew國內如何自動安裝(國內地址):https://zhuanlan.zhihu.com/p/111014448
  2. mac安裝homebrew失敗怎么辦?:https://www.zhihu.com/question/35928898
  3. Mac 安裝 brew(最新教程,絕對可行,一行代碼搞定,不報錯):https://www.cnblogs.com/liyihua/p/12753163.html

訂閱查看

本內容同步更新在網站《王永傑的網絡日志》《微信公眾號》

微信搜索“王永傑的網絡日志”或者掃描二維碼,即可查看訂閱。

(完)


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM