homebrew

it2023-05-28  70

换源

# 替换 Homebrew git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git # 替换 Homebrew Core git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git # 替换 Homebrew Cask git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git # 替换 Homebrew-bottles # 对于 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

常用命令

brew list #列出所有安装的包 brew search + 包名 #在源中搜索期望的包 brew info + 包名 #在源中搜索期望的包,并且打印更详细的信息 brew install + 包名 #安装对应的包 brew uninstall + 包名 #卸载已经安装的包 brew updata #升级brew
最新回复(0)