mac初用指南

Guide Of Mac

  1. 國內網絡安裝HomeBrew

  • 第一步:下載安裝腳本

curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install

  • 第二步:修改安裝腳本中的url路徑


BREW_REPO = “https://github.com/Homebrew/brew”.freeze
替換爲
BREW_REPO = “https://mirrors.ustc.edu.cn/brew.git”.freeze # 當前鏡像爲中科大的,也可以使用其他鏡像,如阿里雲和清華

  • 第三步:使用ruby安裝

/usr/bin/ruby brew_install

  • 第四步:替換homebrew-core源

cd “$(brew --repo)/Library/Taps/homebrew/homebrew-core”
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

  • 第五步:替換homebrew-cask源(未安裝home-cask可以不需要,後續用到再添加)

cd “$(brew --repo)/Library/Taps/homebrew/homebrew-cask”
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

  • 第六步:替換homebrew bottles源

echo ‘export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles’ >> ~/.bash_profile
source ~/.bash_profile

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章