cocoapods not installing cocoapods not installing ios ios

cocoapods not installing


Using following commands, it worked for me.

  1. sudo gem uninstall cocoapods
  2. sudo gem install -n /usr/local/bin
  3. cocoapods pod install

If you encounter this error on step 2:

ERROR: While executing gem ... (Gem::CommandLineError) Please specify at least one gem name (e.g. gem build GEMNAME)

Then try this as step 2 instead (step 3 is not needed):

gem install -n /usr/local/bin cocoapods


If you install cocoapod using brew like me

  1. Reinstall cocoapods

brew reinstall cocoapods

If you see this error message after you reinstall cocoapods by brew reinstall go to step 2.

>Error: The `brew link` step did not complete successfullyThe formula built, but is not symlinked into /usr/localCould not symlink bin/podTarget /usr/local/bin/podalready exists. You may want to remove it:  rm '/usr/local/bin/pod'To force the link and overwrite all conflicting files:  brew link --overwrite cocoapodsTo list all files that would be deleted:  brew link --overwrite --dry-run cocoapodsPossible conflicting files are:/usr/local/bin/pod/usr/local/bin/xcodeproj
  1. To solve conflicting files

brew link --overwrite cocoapods

> Linking /usr/local/Cellar/cocoapods/1.3.1... 2 symlinks created

Hope it helps.


In my case nothing helped, then I:

  1. sudo gem uninstall cocoapods
  2. cd /Users/nikkov/.rvm/rubies/ruby-2.4.1/lib/ruby; In Finder I searched for cocoapods and removed everything.
  3. brew install cocoapods
  4. brew link --overwrite cocoapods (if needed)