美文网首页
[Tips] Mac brew 下载慢

[Tips] Mac brew 下载慢

作者: simplehych | 来源:发表于2020-08-18 09:22 被阅读0次

替换镜像
清华大学开源软件镜像站
中国科学技术大学开源软件镜像
阿里云官方镜像站

brew 下载位置:/Users/user_name/Library/Caches/Homebrew or downloads,再次执行 brew install mysql,会出现 Already downloaded...

1. Homebrew/Linuxbrew 镜像使用帮助

1.1 替换现有上游

# brew 程序本身,Homebrew/Linuxbrew 相同
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

# 以下针对 mac OS 系统上的 Homebrew
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
git -C "$(brew --repo homebrew/cask-fonts)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-fonts.git
git -C "$(brew --repo homebrew/cask-drivers)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask-drivers.git

# 以下针对 Linux 系统上的 Linuxbrew
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/linuxbrew-core.git

# 更换后测试工作是否正常
brew update

1.2 复原

# brew 程序本身,Homebrew/Linuxbrew 相同
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git

# 以下针对 mac OS 系统上的 Homebrew
git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git
git -C "$(brew --repo homebrew/cask-fonts)" remote set-url origin https://github.com/Homebrew/homebrew-cask-fonts.git
git -C "$(brew --repo homebrew/cask-drivers)" remote set-url origin https://github.com/Homebrew/homebrew-cask-drivers.git

# 以下针对 Linux 系统上的 Linuxbrew
git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/linuxbrew-core.git

# 更换后测试工作是否正常
brew update

2. Homebrew-bottles 镜像使用帮助

**注:该镜像是 Homebrew 二进制预编译包的镜像。本镜像站同时提供 Homebrew 的 formula 索引的镜像(即 brew update 时所更新内容)

临时替换:

export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles

长期替换:

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile

参考资料

解决 Homebrew 下载更新极慢的问题
Mac——brew替换源地址&安装配置mysql@5.7版本
mac 上用homebrew安装完mysql后,怎样使用密码连接数据库

相关文章

  • [Tips] Mac brew 下载慢

    替换镜像清华大学开源软件镜像站中国科学技术大学开源软件镜像阿里云官方镜像站 brew 下载位置:/Users/us...

  • mac 使用brew 安装Python

    mac 使用brew 安装Python 安装brew brew 下载python 因为mac 的Xcode 需要使...

  • Mac 下载 brew

    安装方式: /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/...

  • 1.python安装&pycharm工具

    关于python 官网 window下载地址 mac下载地址 mac命令行安装 brew install pyt...

  • MacOS使用

    一、brew install 巨慢 解决方法(以brew install sbt为例) 先下载后安装 下载 此时也...

  • mac下安装git

    前提:mac上已经安装homebrew 1、使用如下命令: brew install git brew会自动去下载...

  • Mac环境下搭建GitHub博客

    1.brew下载 Tips:安装完成后可能提示 /usr/local/bin is not in your PAT...

  • Mac brew 安装慢

    替换源直接参考:https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/

  • 在mac下安装各php版本

    mac安装php最方便的就是brew。但是吧brew上面旧版本是没法下载的。想要在mac上搭建各版本php,并方便...

  • php 学习

    开发工具:mamp mysql:mac用brew安装mysql,设置初始密码下载地址 mysql安装:brew i...

网友评论

      本文标题:[Tips] Mac brew 下载慢

      本文链接:https://www.haomeiwen.com/subject/nbrhjktx.html