其實就是想裝個powershell,而後發現須要安裝homebrewgit
好吧,安,結果,又發現超時,超時,超時
以後,你懂的,百度,百度,百度……
結果,過期的帖子,過時的方法……
唉,人笨,沒辦法,最後死活安上了,作個記錄,要不過2天又忘了github
嗯,開shell,粘上,回車,等着就行shell
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
沒辦法,苦等也是超時,本身動手吧ruby
能夠看到,命令中是執行了一個 install 的腳本,那麼下載下來改改吧bash
#!/usr/bin/ruby # This script installs to /usr/local only. To install elsewhere (which is # unsupported) you can untar https://github.com/Homebrew/brew/tarball/master # anywhere you like. HOMEBREW_PREFIX = "/usr/local".freeze HOMEBREW_REPOSITORY = "/usr/local/Homebrew".freeze HOMEBREW_CORE_TAP = "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core".freeze HOMEBREW_CACHE = "#{ENV["HOME"]}/Library/Caches/Homebrew".freeze # **********下面這行,改爲科大的源地址 ******************** # BREW_REPO = "https://github.com/Homebrew/brew".freeze BREW_REPO = "https://mirrors.ustc.edu.cn/brew.git".freeze # **********看上面 ************************************* # TODO: bump version when new macOS is released MACOS_LATEST_SUPPORTED = "10.14".freeze # TODO: bump version when new macOS is released MACOS_OLDEST_SUPPORTED = "10.12".freeze # no analytics during installation ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1" ENV["HOMEBREW_NO_ANALYTICS_MESSAGE_OUTPUT"] = "1" # 下面還有不少,不粘了,看着累
看着還行,好吧,回車,接着安curl
迷糊,怎麼又停了,原來還要安裝 homebrew-core,結果又去美帝下載了url
好吧,你恨,我改spa
能夠看到 clone 的路徑code
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
咱們接着用科大的blog
git clone https://mirrors.ustc.edu.cn/homebrew-core.git /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
美滋滋……
檢查一下
brew doctor brew update
終因而安上了
brew cask install powershell
醉了,還要用 homebrew-cask
行吧,要安裝的位置知道了,接着抱科大的大腿
git clone https://mirrors.ustc.edu.cn/homebrew-cask.git "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
這裏面的 $(brew --repo)
是 homebrew的安裝位置,也就是默認的 /usr/local/Homebrew
飛通常的感受
接着 powershell
HOOOOOOOOO!!!!!!!!!!!!!,終於安上了
Homebrew Core: 核心軟件倉庫,第一個報錯中的homebrew-core
Homebrew Cask: 提供 macOS 應用和大型二進制文件,第二個報錯中 homebrew-cask
Homebrew Bottles:預編譯二進制軟件包,這個咱們沒用到,須要的能夠看一下科大的說明