CocoaPods安装问题

本文详细介绍了CocoaPods的安装步骤及常见问题解决方法,包括如何更换源以加速安装过程,以及如何处理安装过程中遇到的各种错误。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

主要步骤:

sudo gem install cocoapods
pod setup

验证是否安装成功:

pod search SDWebImage

常见问题:

sudo gem install cocoapods没有反应。

解决方法:替换成淘宝的源

  gem sources --remove https://rubygems.org/  

  gem sources -a http://ruby.taobao.org/  

检查source是否正确替换:

  gem sources -l  

2 pod setup执行过程非常慢,几乎没有反应。解决方法:耐心等待。。。。

3 执行pod setup的时候提示如下错误:

[!] CocoaPods was not able to update the `master` repo. If this is an unexpected issue and persists you can inspect it running `pod repo update --verbose`

解决方法:清除CocoaPods缓存后重新执行pod setup, 命令如下:

sudo rm -fr ~/.cocoapods/repos/master
pod setup

原因:http://guides.cocoapods.org/using/troubleshooting.html#im-getting-permission-errors-while-running-pod-command

 

参考:

http://code4app.com/article/cocoapods-install-usage

http://linyehui.me/2014/12/14/cocoapods-permission-errors-while-pod-update.html

转载于:https://www.cnblogs.com/agger0207/p/4608342.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值