Mac 安裝 Homebrew 出現443錯誤已經修改鏡像

一、Homebrew安裝出現443

出現該問題可以使用國內源:

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

最後安裝提示安裝等待就行。安裝完成之後可以使用下面名稱測試:

 

brew search redis #搜索包信息

二、Homebrew安裝上了,但是有些軟件無法安裝,可以考慮使用阿里鏡像

  1. 替換 / 還原 brew.git 倉庫地址

 

# 替換成阿里巴巴的 brew.git 倉庫地址:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git

# 還原爲官方提供的 brew.git 倉庫地址
cd "$(brew --repo)"
git remote set-url origin https://github.com/Homebrew/brew.git
  1. 替換 / 還原 homebrew-core.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

# 還原爲官方提供的 homebrew-core.git 倉庫地址
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://github.com/Homebrew/homebrew-core.git



 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章