brew使用
brew install安装的所有包都是在/usr/local/Cellar/这个路径下
换源
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31###########清华源
替换brew.git源
git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
替换 homebrew-core.git源
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
替换 homebrew-cask.git源
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git
###########中科大的源
brew.git源
git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
homebrew-core.git源
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
homebrew-cask.git源
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
###########查看
查看brew.git源
git -C "$(brew --repo)" config --get remote.origin.url
查看homebrew-core.git源
git -C "$(brew --repo homebrew/core)" config --get remote.origin.url
查看homebrew-cask.git源
git -C "$(brew --repo homebrew/cask)" config --get remote.origin.url
#########官方源
brew.git源
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
homebrew-core.git源
git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core
homebrew-cask.git源
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask指令
1 | https://www.jianshu.com/p/d2f8ed1127a3 |
评论