校园春色亚洲色图_亚洲视频分类_中文字幕精品一区二区精品_麻豆一区区三区四区产品精品蜜桃

主頁 > 知識庫 > Mac下更換Homebrew鏡像源的實(shí)現(xiàn)方法

Mac下更換Homebrew鏡像源的實(shí)現(xiàn)方法

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

1.使用中科大源

(1)替換默認(rèn)源
第一步:替換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系統(tǒng)的一款開源的包管理器。出于節(jié)省時間的考慮,Homebrew默認(rèn)從Homebrew Bottles源中下載二進(jìn)制代碼包安裝。Homebrew Bottles是Homebrew提供的二進(jìn)制代碼包,目前鏡像站收錄了以下倉庫:

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)替換默認(rèn)源

第一步:替換現(xiàn)有上游

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或者h(yuǎn)omebrew-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.在中科大源或清華源失效或宕機(jī)時可以切換回官方源

第一步:重置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配置文件里的有關(guān)Homebrew Bottles即可恢復(fù)官方源。 重啟bash或讓bash重讀配置文件。

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

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

標(biāo)簽:紅河 沈陽 無錫 青海 阜陽 河源 哈密 忻州

巨人網(wǎng)絡(luò)通訊聲明:本文標(biāo)題《Mac下更換Homebrew鏡像源的實(shí)現(xiàn)方法》,本文關(guān)鍵詞  Mac,下,更換,Homebrew,鏡像,;如發(fā)現(xiàn)本文內(nèi)容存在版權(quán)問題,煩請?zhí)峁┫嚓P(guān)信息告之我們,我們將及時溝通與處理。本站內(nèi)容系統(tǒng)采集于網(wǎng)絡(luò),涉及言論、版權(quán)與本站無關(guān)。
  • 相關(guān)文章
  • 下面列出與本文章《Mac下更換Homebrew鏡像源的實(shí)現(xiàn)方法》相關(guān)的同類信息!
  • 本頁收集關(guān)于Mac下更換Homebrew鏡像源的實(shí)現(xiàn)方法的相關(guān)信息資訊供網(wǎng)民參考!
  • 推薦文章
    主站蜘蛛池模板: 吴堡县| 天柱县| 左贡县| 徐闻县| 颍上县| 唐山市| 孙吴县| 十堰市| 苏州市| 扶绥县| 元阳县| 湖州市| 偃师市| 康保县| 汉中市| 萍乡市| 屏边| 手机| 沐川县| 沂南县| 连城县| 兴隆县| 利津县| 广西| 宁夏| 西乌珠穆沁旗| 怀集县| 三门县| 噶尔县| 当阳市| 福海县| 平凉市| 喀什市| 旺苍县| 贵南县| 南投县| 鄂尔多斯市| 泰州市| 天等县| 罗田县| 诏安县|