cocoapod安装问题

新电脑  IMac 每次安装 中途都报错  有几次Receiving objects:   0% (16051/3431190), 3.19 MiB | 34.00 KiB/s 这个进度都到99%结果还是直接报错   

错误如下

remote: Enumerating objects: 7473, done.

remote: Counting objects: 100% (7473/7473), done.

remote: Compressing objects: 100% (7151/7151), done.

error: RPC failed; curl 18 transfer closed with outstanding read data remaining

fatal: the remote end hung up unexpectedly

fatal: early EOF

fatal: index-pack failed

于是我全卸载了  重新安装 sudo gem install cocopods  烦银的又来了

 sudo gem install cocoapods

ERROR: While executing gem ... (Gem::FilePermissionError)

You don't have write permissions for the /usr/bin directory

说是没有写入到 /usr/bin directory的权限 

于是执行下面命令即可

sudo gem install cocoapods -n /usr/local/bin

提示

Successfully installed cocoapods-1.7.5

Parsing documentation for cocoapods-1.7.5

Installing ri documentation for cocoapods-1.7.5

Done installing documentation for cocoapods after 4 seconds

1 gem installed

根据在网上百度的一些方法进行测试

比如  说缓冲区溢出 

git config http.postBuffer 524288000

又比如  当网络比较缓慢 下载断开  使用增加最低速度时间来继续下载

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999

昨晚没关电脑回家  失败了  不过今天早上一来 速度达到5M/s  一下子就下好了  还不报错  按照上面设置 应该是可以的

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值