on mac os sierra, stuck on “Setting up CocoaPods master repo”

拈花ヽ惹草 提交于 2019-12-06 04:37:27

问题


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?


回答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



回答2:


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.



来源:https://stackoverflow.com/questions/39713370/on-mac-os-sierra-stuck-on-setting-up-cocoapods-master-repo

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!