homebrew配置
时间: 2023-09-10 16:12:15 浏览: 100
Homebrew配置包括安装Homebrew、更换镜像和使用Brew命令。首先,可以通过运行以下命令来安装Homebrew:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
如果需要卸载Homebrew,可以运行以下命令:
/bin/bash -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall)"
要自升级Homebrew,可以运行以下命令:
brew upgrade brew
接下来,如果想要更换镜像,可以按照以下步骤进行操作:
1. 打开终端,并依次运行以下命令:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.***brew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask"
git remote set-url origin git://mirrors.tuna.tsinghua.edu.cn/homebrew-cask.git
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
最后,你可以使用Brew命令来安装、卸载、更新和管理软件包。具体的Brew命令用法可以参考Homebrew的官方文档或运行"brew help"来获取帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [Homebrew安装与配置](https://blog.csdn.net/Gusand/article/details/119214434)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文