天天看點

MacOS-homebrew解除安裝重裝并更換國内源

原文連結: http://chenhao.space/post/90d57007.html

  1. 解除安裝:

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"

  2. 重裝:

    ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  3. 更新:

    brew update

  4. 更換科大鏡像源:
    # 第一步:替換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
    
    # 更新
    brew update
               

繼續閱讀