I’ve got the exact same problem and the following procedure has worked for me.
Just run the following commands in the below-given order:
gem list --local | grep cocoapods sudo gem uninstall (each item from above command) sudo rm -rf ~/.cocoapods sudo gem install cocoapods cd (PROJECT DIRECTORY) pod init (put cocoapod in podfile) pod install rm -rf ~/.cocoapods/repos/trunk/ pod cache clean --all pod install
Reference Link :
Pod install failure – Catalina 10.15.3