MacM1安装homebrew步骤

本文详细介绍了在Mac终端中安装Homebrew的过程,包括通过命令行执行安装脚本,解决git权限问题,选择中科大镜像源,并最终成功安装验证。此外,还讲述了如何使用brew安装fig自动补全工具,以及处理可能出现的问题和重新安装的步骤。
摘要由CSDN通过智能技术生成

此安装在终端通过命令进行:

1、shanshanfaguangdemeishaonv@shanshanfaguangdemeishaonvdeMacBook-Pro ~ % /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

如果此步骤提示安装git,就点击安装,等待安装成功之后,可以重启终端,再次输入上面的命令

2、选择1、中科大下载源

按照命令输入y,及开机密码

3、国内源选择1、中科大国内源

4、重启终端

5、brew -v,出现

shanshanfaguangdemeishaonv@shanshanfaguangdemeishaonvdeMacBook-Pro ~ % brew -v
Homebrew 3.6.10-2-g72f7880
fatal: detected dubious ownership in repository at '/opt/homebrew/Library/Taps/homebrew/homebrew-core'
To add an exception for this directory, call:

	git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
Homebrew/homebrew-core (no Git repository)
fatal: detected dubious ownership in repository at '/opt/homebrew/Library/Taps/homebrew/homebrew-cask'
To add an exception for this directory, call:

	git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
Homebrew/homebrew-cask (no Git repository)

输入:

git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core

回车,在输入

% git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask

6、再次输入brew -v显示如下,证明安装成功

Homebrew 3.6.10-2-g72f7880
Homebrew/homebrew-core (git revision e0b255a2805; last commit 2022-11-10)
Homebrew/homebrew-cask (git revision ba78f1254a; last commit 2022-11-10)

7、在终端使用brew install fig 命令安装自动补全工具,下载好回桌面点击fig安装,途中如果有问题就可以 brew uninstall fig,重新安装。在保证网络好的情况下安装软件。 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值