After upgrading to Sierra 10.12, doing a clean install from scratch, I am not able to install libraries using cocoapods, by making the "pod install" I get this: "Setting up CocoaPods repo master". I hope you can help me. Thank you.
-
Duplicate of https://stackoverflow.com/questions/39713370/cocoapods-on-mac-os-sierra – Cœur Jan 03 '17 at 17:34
2 Answers
In my first installation, I got the same problem too, it takes too much time in "setting up master repo". You can see it through "activity monitor" that it actually is downloading, but it seems the connection is slow from their server.
Try these following 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 around 5 minutes for me (I think it depends on internet connection), then I can do "pod install".

- 1,994
- 1
- 15
- 18
install CocoaPods
sudo gem install cocoapods
If it throw error like this
ERROR: While executing gem ... (Errno::EPERM)
Operation not permitted - /usr/bin/pod
you can try again in this way:
sudo gem install -n /usr/local/bin cocoapods
if it even throw error like :
ERROR: Error installing cocoapods:
activesupport requires Ruby version >= 2.2.2.
then check the ruby version
ruby -v
if logs:
ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin15]
that means you need to update ruby
rvm list known
if logs:
command not found
then you should:
curl -L get.rvm.io | bash -s stable
rvm install 2.2.2
if logs:
Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.12/x86_64/ruby-2.2.2. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for osx. Missing required packages: autoconf automake libtool pkg-config libyaml readline libksba openssl Somehow it happened there is no executable 'openssl', run 'brew doctor' and make sure latest '' is installed properly. Requirements installation successful. Installing Ruby from source to: /Users/mac/.rvm/rubies/ruby-2.2.2, this may take a while depending on your cpu(s)... ruby-2.2.2 - #downloading ruby-2.2.2, this may take a while depending on your connection...
then you should:
rvm autolibs read-only
rvm install 2.2.2
You can install now:
pod install

- 8,543
- 9
- 56
- 84