MacM1安装homebrew步骤

1.在mac终端运行:/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
在这一步提示安装xcode没有的话需要安装或者更新最新版
2.会出现安装选项选择1、中科大下载源;按照命令输入y,及开机密码
3.安装完后还有选项选择1、中科大下载4.需要重启终端/或者输入 source /Users/zjing/.zprofile 运行即可

5.运行brewv 出现以下情况

Homebrew 4.0.6-15-g8e13a6e
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 4.0.6-15-g8e13a6e
Homebrew/homebrew-core (git revision 80b527e6314; last commit 2023-03-12)
Homebrew/homebrew-cask (git revision fee2067879; last commit 2023-03-12)

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

原文地址:https://blog.csdn.net/qq_43197919/article/details/129476256

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任

如若转载,请注明出处:http://www.7code.cn/show_45638.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注