安装Homebrew
1.输入命令等待安装
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2.添加路径
echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc
3.刷新
source ~/.zshrc
问题:Homebrew 的安装脚本可能在某些情况下无法正确检测或下载 Command Line Tools。
1,手动安装 Command Line Tools: xcode-select --install
/通过 Homebrew 安装 CocoaPods brew install cocoapods
pod setup(安装本地库)
pod repo update(更新本地库)