Install CocoaPods Using Homebrew in macOS Monterey
Open terminal
Run this command
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Install CocoaPods
brew install cocoapodsIf you get the error as below., you may want to remove it:
rm /usr/local/bin/xcodeprojError: Could not symlink bin/xcodeproj Target /usr/local/bin/xcodeproj already exists. You may want to remove it: rm '/usr/local/bin/xcodeproj'
Run this command
rm '/usr/local/bin/xcodeproj'Run this command to force the link and overwrite all conflicting files:
brew link --overwrite cocoapodsNow check
pod —version—-version, it will show installed pod version