ios Cocoapods 设置卡在终端上的 pod setup 命令上

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21680573/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 23:24:36  来源:igfitidea点击:

Cocoapods setup stuck on pod setup command on terminal

iosrubygitxcode5cocoapods

提问by sanjay

MacBook-Pro:~ skbc$ pod setup --verbose
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040777

Setting up CocoaPods master repo

Cloning spec repo `master` from `https://github.com/CocoaPods/Specs.git` (branch `master`)
  $ /usr/bin/git clone 'https://github.com/CocoaPods/Specs.git' master
  Cloning into 'master'...

Have gone through resources provided by Cocoapods web site, SO and few video tutorials. Nothing happening even after waiting for couple of hours, however still trying to figure-out what may be the problem is? I would very much appreciate your comments and suggestions. Thank you!!!

浏览了 Cocoapods 网站提供的资源、SO 和一些视频教程。即使等了几个小时也没有任何反应,但仍然试图找出可能是什么问题?我非常感谢您的意见和建议。谢谢!!!

回答by Manuel M.

It is not stuck. I thought the same until I went to the "Activity Monitor" of the system and checked the "Network" tab.

它没有被卡住。我也是这么想的,直到我转到系统的“活动监视器”并检查“网络”选项卡。

Then you will see that something is being downloaded. A process called git-remote-httpis in charge of this.

然后你会看到正在下载一些东西。一个叫做进程git-remote-http负责这个。

Screenshot 1

截图 1

Just wait! It happened the same for me :)

等着吧!对我来说也发生了同样的事情:)

Good luck!

祝你好运!

回答by C?ur

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

回答by shehanrg

This might be due to the http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/issue... You will have to remove the repo and re-setup it...

这可能是由于http://blog.cocoapods.org/Repairing-Our-Broken-Specs-Repository/问题...您必须删除该存储库并重新设置它...

pod repo remove master
pod setup

worked for me

为我工作

Answered in below question as well, Error on pod install

也在下面的问题中回答了 pod install 错误

回答by Musadaq Rasees

I think you need to follow the steps to get rid of the situation and also add --verboseto check whats is happening in front of each command eg:

我认为您需要按照步骤摆脱这种情况,并添加--verbose以检查每个命令前面发生的情况,例如:

$ pod setup --verbose
  • pod repo remove master
  • pod setup
  • pod install
  • pod repo 移除 master
  • 吊舱设置
  • 吊舱安装

回答by Sachin Nikumbh

This is not Stuck or not doing anything its downloading/cloning repository (total size is around 360MB, I am not sure)

这不是卡住或不做任何下载/克隆存储库的事情(总大小约为 360MB,我不确定)

1) Open Activity Monitor

1) 打开活动监视器

2) Select NetworkTab

2) 选择网络标签

3) Check bellow Google chrome-> git-remote-https

3)检查波纹管谷歌浏览器-> git-remote-https

enter image description here

在此处输入图片说明

回答by Daniel Shin

For insecure people like me who needs an assurance that cocoapods, in fact, is doing the work, try this. The slowest bottleneck is when cocoapods try to clone the entire repo (~300 MB) into ~/.cocoapods

对于像我这样需要确保 cocoapods 实际上正在工作的缺乏安全感的人来说,试试这个。最慢的瓶颈是当 cocoapods 尝试将整个 repo (~300 MB) 克隆到~/.cocoapods

while true; do
  du -sh ~/.cocoapods/
  sleep 3
done

回答by PeiweiChen

For me in China

对我在china

I have to use SSHand --depth=1to boost up!

我必须使用SSH--depth=1来提升!

pod repo remove master
git clone --depth=1 [email protected]:CocoaPods/Specs.git  ~/.cocoapods/repos/master 
pod setup

回答by Jayprakash Dubey

The time required for Pod setupdepends on your Internet connection speed.You can check Activity Monitorapplication regarding this.

Pod 设置所需的时间取决于您的 Internet 连接速度。您可以检查有关此的活动监视器应用程序。

Screenshot 1

截图 1

It is recommended to use pod setup --verbosecommand instead of pod setup.

建议使用pod setup --verbosecommand 而不是pod setup.

This verbose helps you to see detailed stats while pod is being setup.

此详细信息可帮助您在设置 pod 时查看详细统计信息。

Screenshot 2

截图 2

回答by NoWay

--VMWare Workstation--virtualizedMac--NetworkSetting--Problem

--VMWare Workstation--virtualizedMac--网络设置--问题

After like 100 tries I got it to work! I have tried nearly everything described here but nothing solved the problem. It randomly stopped by cloning into master between 0% and 97%. In Activity Monitor I saw the network traffic has stopped.

大约 100 次尝试后,我让它工作了!我几乎尝试了这里描述的所有内容,但没有解决问题。它通过在 0% 到 97% 之间克隆到 master 来随机停止。在活动监视器中,我看到网络流量已停止。

Finally I have changed the network setting from NAT to BRIDGE. This was the solution!

最后,我将网络设置从 NAT 更改为 BRIDGE。这就是解决方案!

回答by Gabriel Rigolon

To execute it, you must pay attention in your Internet connection... if it fails for a sec, the command won't continue, but terminal won't tell you what's happening. If the command fails, continue trying... worked for me! I've used that command!

要执行它,您必须注意您的 Internet 连接......如果它失败了一秒钟,命令将不会继续,但终端不会告诉您发生了什么。如果命令失败,请继续尝试...为我工作!我用过那个命令!

$ git clone https://github.com/CocoaPods/Specs.git~/.cocoapods/repos/master

$ git clone https://github.com/CocoaPods/Specs.git~/.cocoapods/repos/master