报错:
You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory
解决办法:
https://developer.apple.com/forums/thread/697249
Step 1 (install HomeBrew)
/bin/bash -c "$(curl -fsSL [https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh](https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh))
Step 2 (Run these two commands in your terminal to add Homebrew to your PATH)
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/”YOUR USER FORLDER”/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
Step 3 (now you can install cocoapods)
brew install cocoapods
说真的,百度搜出来的都没有解决掉,建议Google