Skip to content

Instantly share code, notes, and snippets.

@derekli66
Last active August 10, 2018 18:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save derekli66/45406e2f94a2d8056e34 to your computer and use it in GitHub Desktop.
Save derekli66/45406e2f94a2d8056e34 to your computer and use it in GitHub Desktop.
Reinstall Cocoapods
When pod install or pod update gets hanged at "Analyzing dependencies", please consider to reinstall cocoapods.
#Uninstallation. Reference: http://superuser.com/questions/686317/how-to-fully-uninstall-the-cocoapods-from-the-mac-machine
$gem list --local | grep cocoapods
#The list will show like this
cocoapods (0.27.1, 0.20.2)
cocoapods-core (0.27.1, 0.20.2)
cocoapods-downloader (0.2.0, 0.1.2)
#Then uninstall all cocoapods related gem
$gem uninstall cocoapods
$gem uninstall cocoapods-core
$gem uninstall cocoapods-downloader
#Reinstall cocoapods
#sudo gem install cocoapods
##Repairing broken specs. Reference: http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/
$sudo rm -fr ~/.cocoapods/repos/master
$pod setup
#After setup and edit your Podfile
$pod install
#or
$pod update
@derekli66
Copy link
Author

The methods I have tried to solve pod install hanging issue. Try this if you would have encountered the same issue. Please also let me know if this works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment