Hombrew更換映象源

2021-10-01 08:40:59 字數 1372 閱讀 6951

以中科大映象源為例

替換brew.git:

cd

"$(brew --repo)

"git remote set-url origin git:

替換homebrew-core.git:

cd

"$(brew --repo)

/library/taps/homebrew/homebrew-core"

git remote set-url origin git:

執行上述命令之後,請執行 brew update 命令:

brew update
對於bash使用者:

echo

'export homebrew_bottle_domain='

>> ~/.bash_profile

source ~/.bash_profile

對於zsh使用者:

echo

'export homebrew_bottle_domain='

>> ~/.zshrc

source ~/.zshrc

brew config
brew –help             #檢視brew的幫助

brew install

git#安裝git軟體

brew uninstall git

#解除安裝git軟體

brew search git

#搜尋git軟體

brew list #顯示已經安裝軟體列表

brew update #更新軟體,把所有的formula目錄更新,並且會對本機已經安裝並有更新的軟體用*標明。

brew upgrade git

#更新某具體軟體

brew [info | home]

[formula…]

#檢視軟體資訊

brew cleanup git

#單個軟體刪除,和upgrade一樣

brew cleanup #刪除所有

brew outdated #檢視那些已安裝的程式需要更新

brew home * #用瀏覽器開啟

brew info * #顯示軟體內容資訊

brew deps * #顯示包依賴

brew config #檢視brew配置

中科大映象源:

清華映象源:

更換centos映象源

國內主要開源的開源映象站點網易和阿里雲,可以更改為這兩個之一,在此使用網易的映象演示 1.首先備份系統自帶yum源配置檔案 我的源hanwate cdrom.repo.backup 根據實際情況修改 mv etc yum.repos.d hanwate cdrom.repo etc yum.repo...

conda更換映象源

新增國內源 conda config add channels conda config add channels conda config set show channel urls yes 換回預設源 conda config remove key channels 在執行conda confi...

cocoaPod 更換映象源

pod install那龜爬速度難以承受,於是想起更換一下映象源。在網上查到的命令大體如下 pod repo remove master pod repo add master 映象源位址 pod setup 但是每次執行 pod repo add master 都提示 to setup the m...