查看brew镜像源
git -C “$(brew –repo)” remote -v
查看homebrew-core镜像源
git -C “$(brew –repo homebrew/core)” remote -v
查看homebrew-cask镜像源(需要安装后才能查看)
git -C “$(brew –repo homebrew/cask)” remote -v
替换brew.git:
cd “$(brew –repo)”
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
替换homebrew-core.git:
cd “$(brew –repo)/Library/Taps/homebrew/homebrew-core”
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
替换homebrew-cask.git:
cd “$(brew –repo)/Library/Taps/homebrew/homebrew-cask”
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
应用生效
brew update
替换homebrew-bottles:
echo ‘export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles’ >> ~/.bash_profile
source ~/.bash_profile
版本号:brew -v
更新:brew update
本地软件库列表:brew list
查看软件库版本:brew list –versions
查找软件包:brew search xxx (xxx为要查找软件的关键词)
安装软件:brew cask install xxx(xxx为软件名称)
卸载软件:brew cask uninstall xxx
查找软件安装位置:which xxx (xxx为软件名称)
清理所有旧版本包:brew cleanup
列出所有旧版本包:brew cleanup -n
查看一安装软件的依赖:brew deps -installed –tree
- 本文固定链接: https://www.cnmiss.cn/?p=510
- 转载请注明: admin 于 我的博客 – 技术分享 发表