深度保持探索全栈开发的无限可能
记录技术成长的每一步

MacOS Homebrew切换镜像

注意:下面命令会区分cmd的类型,如果你不清楚,可用下面命令查看。

- -

阿里云镜像

替换 brew.git

- --- ---
- ------ ------- ------ --------------------------------------------

替换 homebrew-core.git

- --- ---
- ------ ------- ------ -----------------------------------------------------

注意:这里可能会报错:cd: no such file or directory: /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core

应用生效

---- ------

替换 homebrew-bottles

- - -
- - - - ---------------
- ---------------

- - -
- - - - --------
- --------

清华源镜像

替换 brew.git

- - --- --- ------ ------- ------ ----------------------------------------------------------

替换 homebrew-core.git

- - --- - --- ------ ------- ------ -------------------------------------------------------------------

替换 homebrew-cask.git

- - --- - --- ------ ------- ------ -------------------------------------------------------------------

应用生效

---- ------

替换 homebrew-bottles

- - -
- - - - ---------------
- ---------------

- - -
- - - - --------
- --------

还原

- - -
- --- ---
- ------ ------- ------ ------------------------------------

- - -
- --- ---
- ------ ------- ------ ---------------------------------------------

执行下面命令打开配置文件,删除掉环境变量文件中的 HOMEBREW_BOTTLE_DOMAIN

- - -
- ---------------

- - -
- --------

环境变量生效

- - -
- ---------------

- - -
- --------