MacOS安装homebrew并且配置国内镜像
一、安装homebrew
如果命令失败进入官网查看https://brew.sh/
执行下面命令:
1 | /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" |
二、配置homebrew
1、在配置文件中添加配置
1 | #如果您使用的是 Bash 而不是 Zsh,可以替换为 .bash_profile 或 .bashrc |
2、查看是否安装cask和core
如果找不到Taps目录则没有安装,需要手动安装cask和core
1 | ls /opt/homebrew/Library/Taps/homebrew |
1 | brew install homebrew-cask |
安装后重新查看目录是否存在
三、配置国内镜像
1、修改镜像源
1 | # 替换 Homebrew |
- Title: MacOS安装homebrew并且配置国内镜像
- Author: The Redefine Team
- Created at : 2023-07-19 09:34:01
- Updated at : 2023-07-19 10:04:55
- Link: https://redefine.ohevan.com/2023/07/19/MacOS安装homebrew并且配置国内镜像/
- License: This work is licensed under CC BY-NC-SA 4.0.
Comments