Brew的安装以及切换源

1、安装

     现有的脚本 

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

 

 2、切换源

     目前切换的是阿里云的 

      1、HomeBrew 安装后 在本地  cd /usr/local/Homebrew  ,然后  git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git  

      2、然后 cd  /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core ,然后 git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git

      3、刷新下 文件 echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile

          source ~/.bash_profile

      4、brew update

posted @ 2021-12-27 18:02  Yuan_x  阅读(1280)  评论(0编辑  收藏  举报