站長資訊網
最全最豐富的資訊網站

一招教你怎么使用mac 安裝配置 homebrew(代碼分享)

之前的文章《淺析JS中base64和圖片互相轉換(附代碼)》中,給大家了解了JS中base64和圖片互相轉換。下面本篇文章給大家介紹怎么使用mac安裝配置homebrew,我們一起看看怎么做。

一招教你怎么使用mac 安裝配置 homebrew(代碼分享)

最近換電腦了,發現homebrew安裝不上了,我感覺是網絡問題,連了個vpn,發現還是不行,哈哈,是姿勢不對

安裝

運行下面自動腳本(已經全部替換為國內地址):

(Mac)常規安裝腳本(推薦完全體幾分鐘安裝完成)

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

(Mac)精簡版幾秒鐘安裝完成

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" speed

(Mac)卸載腳本

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"

(Linux)安裝腳本:

rm Homebrew.sh ; wget https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh ; bash Homebrew.sh

(Linux)卸載腳本:

rm HomebrewUninstall.sh ; wget https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh ; bash HomebrewUninstall.sh

安裝問題

如果發現有各種安裝不上的運行:

sudo rm -rf /usr/local/Homebrew

提示系統太舊的 (Failed to install Homebrew Portable Ruby (and your system version is too old)!) 運行:

HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/bottles-portable-ruby  rm -rf /Users/$(whoami)/Library/Caches/Homebrew/  brew update

切換鏡像源

阿里云homebrew

配置方法:[https://developer.aliyun.com/mirror/homebrew]。

# 替換brew.git: cd "$(brew --repo)" git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git # 替換homebrew-core.git: cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git # 應用生效 brew update # 替換homebrew-bottles: echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile source ~/.bash_profile

騰訊云homebrew

配置方法:Homebrew鏡像使用幫助

[https://mirrors.cloud.tencent.com/help/homebrew.html]。

cd "$(brew --repo)" git remote set-url origin http://mirrors.cloud.tencent.com/git/homebrew/brew.git  cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin http://mirrors.cloud.tencent.com/git/homebrew/homebrew-core.git  brew update

配置方法:Homebrew-bottles鏡像使用幫助

[https://mirrors.cloud.tencent.com/help/homebrew-bottles.html]。

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.cloud.tencent.com/homebrew-bottles' >> ~/.bash_profile source ~/.bash_profile

中科大homebrew

配置方法:Homebrew源使用幫助[http://mirrors.ustc.edu.cn/help/brew.git.html]。

cd "$(brew --repo)" git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

配置方法:Homebrew Core源使用幫助[http://mirrors.ustc.edu.cn/help/homebrew-core.git.html]。

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

配置方法:Homebrew Bottles源使用幫助[http://mirrors.ustc.edu.cn/help/homebrew-bottles.html]。

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

推薦學習:MacOS教程

贊(0)
分享到: 更多 (0)
網站地圖   滬ICP備18035694號-2    滬公網安備31011702889846號
97精品国产91久久久久久久| 精品人妻系列无码一区二区三区| 日本精品一区二区三区在线视频一 | 中文字幕日韩国产| 精品国产乱码久久久久久鸭王1 | 国产精品久久久久久久伊一| 亚洲精品伦理熟女国产一区二区| 亚洲91精品麻豆国产系列在线| 无码人妻精品一区二区三区在线| 久久久久四虎国产精品| 国产精品香港三级国产AV| 99久久精品国产高清一区二区| 国产农村妇女毛片精品久久| 亚洲?V无码乱码国产精品| 精品91一区二区三区| 日韩在线观看完整版电影| 日韩成人大屁股内射喷水| 久久精品无码一区二区日韩AV| 国产午夜久久精品| 日韩久久久久中文字幕人妻| 国产精品不卡在线| 国产精品国产免费无码专区不卡| 精品国产亚洲第一区二区三区| 国产亚洲精品AAAA片APP| 四虎影视成人精品| 麻豆国产VA免费精品高清在线| 国内精品国语自产拍在线观看91| 精品国产亚洲AV麻豆 | 国内精品久久久久久不卡影院| 老司机精品免费视频| a级精品九九九大片免费看| 国内精品九九久久精品| 国产亚洲美女精品久久久2020| 亚洲线精品一区二区三区| 国产亚洲精品一品区99热| 精品视频一区二区三区免费| 亚洲国产精品成人久久| 亚洲Av无码精品色午夜| 亚洲国产精品久久| 91精品一区二区综合在线| 亚洲日韩国产精品乱-久|