m1安装homebrew

1.打开终端,输入

/bin/zsh -c "$(curl -fsSL https://gitee.com/huwei1024/HomebrewCN/raw/master/Homebrew.sh)"

 2.

回车,按照提示运行,最好选中科大的镜像源

3.做完以后发现command not found brew

4.

在终端输入 cd ~

5.创建.zshrc文件

touch .zshrc

6.打开文件进行编辑

open -e .zshrc
输入

export PATH=/opt/homebrew/bin:$PATH

export PATH=/opt/homebrew/sbin:$PATH

7.保存(command+s)

8.输入

source .zshrc

9.brew -v测试是否安装成功

posted @ 2022-01-29 23:29  Lindseyyip  阅读(70)  评论(0)    收藏  举报