新买的mac,一系列的安装环境
使用官网的命令安装失败,找了下网上的其他安装教程,亲测有效
官网地址:https://brew.sh/index_zh-cn.html
# 亲测可行
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
安装完提示需要配置环境变量
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/chenyuxi/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
我在~目录下没有找到.bash_profile和.bashrc 就自己创建了一个, 然后source
touch .bash_profile
vim .bash_profile
source .bash_profile
参考:
https://www.jianshu.com/p/e0471aa6672d?utm_campaign=hugo