[!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are

终端执行pod setup报如下的错误信息 -- [!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down

 

有兴趣的同学可以直接参考stackoverflow上的,链接地址:https://stackoverflow.com/questions/38993527/cocoapods-failed-to-connect-to-github-to-update-the-cocoapods-specs-specs-repo/48962041#48962041

 

$ which openssl

/usr/bin/openssl

 

$ openssl version

OpenSSL 0.9.8zh 14 Jan 2016

 

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

 

$ brew update

 

$ brew install openssl

 

$ brew upgrade openssl

 

`` If you need to have this software first in your PATH run: echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

 

$ echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

$ source ~/.bash_profile

 

$ which openssl

/usr/local/opt/openssl/bin/openssl

 

$ openssl version

 

 

OpenSSL 1.0.2o  27 Mar 2018

 

$ brew install rbenv ruby-build

 

$ echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile

$ echo 'if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi' >> ~/.bash_profile

$ source ~/.bash_profile

 

$ rbenv install --list

 

Available versions:

  1.8.5-p52

  1.8.5-p113

  1.8.5-p114

  1.8.5-p115

  1.8.5-p231

  1.8.6

:

  2.5.0-rc1

  2.5.0

  2.6.0-dev

:

 

$ rbenv install 2.5.0

 

$ rbenv versions

* system (set by /Users/username/.rbenv/version)

  2.5.0

 

$ ruby --version

ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]

 

$ rbenv global 2.5.0

 

$ rbenv versions

  system

* 2.5.0 (set by /Users/username/.rbenv/version)

 

$ ruby --version

ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-darwin16]

 

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

 

$ which pod

/usr/local/bin/pod

 

$ pod --version

1.4.0

 

当如上命令全部运行完毕并都成功的话,我们在运行pod setup,就没有问题了。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值