4

After moving to mac os sierra, I completely formatted my mac now I'm facing problem to install cocoapods, every time I run sudo gem install cocoapods --pre every thing installed well, and when I try to install a pod, the terminal stack on Setting up CocoaPods master repo . Already updated the system with sudo gem update --system and still got the same problem, searched online to found old answers to use pod install --verbose

Ss I found in THIS answer fail again tells to install it manually.

NOTE : I have the latest version of 'Command Line Tools'. Any suggestion or how to install master repo manually?

Community
  • 1
  • 1
Omar
  • 185
  • 2
  • 14
  • i also facing the same problem ,please answer this if any one have idea for cocoapods installation on new os Sierra 10.12 version . – Hiren kanetiya Sep 30 '16 at 11:14
  • The problem is that you are running cocoapods in a "new" environment so it needs to update the index of all the repositories registered on cocoapods. That process takes a lot of time depending on your internet connection. – David Velarde Nov 18 '16 at 04:20

2 Answers2

1

From https://stackoverflow.com/a/21852985/1033581:

on 4th Nov 2016, the repo is 1.07 GB

From https://stackoverflow.com/a/33699136/1033581:

To get a progression, you can clone master yourself:

pod repo remove master
git clone https://github.com/CocoaPods/Specs.git ~/.cocoapods/repos/master
pod setup
Community
  • 1
  • 1
Cœur
  • 37,241
  • 25
  • 195
  • 267
0

In my first installation, I got the same problem too, it takes too much time in "setting up master repo".

Actually, you can see it through "activity monitor" that it's actually downloading, but it seems the connection is slow from the server.

Try these steps, it solves my problem:

1. pod setup

It will do "setting up master" again, don't wait, continue these steps below:

2. Ctrl +C
3. pod repo remove master
4. cd ~/.cocoapods/repos 
5. git clone --depth 1 https://github.com/CocoaPods/Specs.git master

It takes less than 7 minutes for me (I think it depends on internet connection), then I can do pod install.

Arman H
  • 5,488
  • 10
  • 51
  • 76
Muhammad Fauzi Masykur
  • 1,994
  • 1
  • 15
  • 18