ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension

Recently upgraded pod reported an error, solution

1.brew cleanup -d -v

two   brew install cocoapods

3. Installation failed   brew link cocoapods

Update pod  

brew upgrade cocoapods


Read More: