m1 macbook 安装homebrew

2021/05/06
安装过程中出现

Warning: /opt/homebrew/bin is not in your PATH.

查询brew版本,输入

brew --version

返回错误

zsh: command not found: brew

(问题解决以后经查询了解,从Catalina开始shell从bash换成zsh了。因为刚学习开发,且M1 Macbook是自己接触的第一台MacOS设备,所以不太了解。)

查询安装过程发现在末尾有一段描述

==> Next steps:
- Add Homebrew to your PATH in /Users/bergtse/.zprofile:
    echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/bergtse/.zprofile
    eval "$(/opt/homebrew/bin/brew shellenv)"

遂复制粘贴,运行。
再次查询brew版本,成功返回:

Homebrew 3.1.5
Homebrew/homebrew-core (git revision 24d1b869d0; last commit 2021-05-06)

你可能感兴趣的:(m1 macbook 安装homebrew)