婷婷综合国产,91蜜桃婷婷狠狠久久综合9色 ,九九九九九精品,国产综合av

主頁 > 知識庫 > Mac下更換Homebrew鏡像源的實現方法

Mac下更換Homebrew鏡像源的實現方法

熱門標簽:寧夏保險智能外呼系統哪家好 防城港市ai電銷機器人 交行外呼系統有哪些 不同的地圖標注 激戰黃昏地圖標注說明 臨滄移動外呼系統哪家有 怎么更改地圖標注電話 溫嶺代理外呼系統 隨州銷售外呼系統平臺

1.使用中科大源

(1)替換默認源
第一步:替換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
cd 
brew update

(2)替換Homebrew Bottles源

Homebrew是OS X系統的一款開源的包管理器。出于節省時間的考慮,Homebrew默認從Homebrew Bottles源中下載二進制代碼包安裝。Homebrew Bottles是Homebrew提供的二進制代碼包,目前鏡像站收錄了以下倉庫:

homebrew/homebrew-core
homebrew/homebrew-dupes
homebrew/homebrew-games
homebrew/homebrew-gui
homebrew/homebrew-python
homebrew/homebrew-php
homebrew/homebrew-science
homebrew/homebrew-versions
homebrew/homebrew-x11

對于bash用戶:

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

對于zsh用戶

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc

source ~/.zshrc

2.使用清華源

(1)替換默認源

第一步:替換現有上游

cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
cd 
brew update

第二步:使用homebrew-science或者homebrew-python

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-science"

git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-science.git

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-python"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-python.git
cd 
brew update

(2)替換Homebrew Bottles源

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

3.在中科大源或清華源失效或宕機時可以切換回官方源

第一步:重置brew.git

cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git

第二步:重置homebrew-core.git

cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git
cd
brew update

第三步:注釋掉bash配置文件里的有關Homebrew Bottles即可恢復官方源。 重啟bash或讓bash重讀配置文件。

到此這篇關于Mac下更換Homebrew鏡像源的實現方法的文章就介紹到這了,更多相關Mac更換Homebrew鏡像源內容請搜索腳本之家以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持腳本之家!

您可能感興趣的文章:
  • pip/anaconda修改鏡像源,加快python模塊安裝速度的操作
  • windows環境下修改pip鏡像源的方法詳解
  • windows及linux環境下永久修改pip鏡像源的方法
  • 在Anaconda3下使用清華鏡像源安裝TensorFlow(CPU版)
  • mac下pip、conda、homebrew修改為清華鏡像源的方法

標簽:紅河 沈陽 無錫 青海 阜陽 河源 哈密 忻州

巨人網絡通訊聲明:本文標題《Mac下更換Homebrew鏡像源的實現方法》,本文關鍵詞  Mac,下,更換,Homebrew,鏡像,;如發現本文內容存在版權問題,煩請提供相關信息告之我們,我們將及時溝通與處理。本站內容系統采集于網絡,涉及言論、版權與本站無關。
  • 相關文章
  • 下面列出與本文章《Mac下更換Homebrew鏡像源的實現方法》相關的同類信息!
  • 本頁收集關于Mac下更換Homebrew鏡像源的實現方法的相關信息資訊供網民參考!
  • 推薦文章
    主站蜘蛛池模板: 巴楚县| 习水县| 浦北县| 邢台县| 沙雅县| 隆德县| 元氏县| 中阳县| 蓝山县| 巩留县| 利津县| 平远县| 包头市| 沽源县| 北海市| 平南县| 丹东市| 北京市| 和平县| 斗六市| 汉川市| 清新县| 正宁县| 宁阳县| 工布江达县| 昌都县| 博罗县| 治多县| 遵义县| 从江县| 阳城县| 抚松县| 寿阳县| 雷山县| 谷城县| 英吉沙县| 磐石市| 永平县| 许昌县| 台南市| 陈巴尔虎旗|