CocoaPods not working in macOS High Sierra

Q:

$pod install

zsh: /usr/local/bin/pod: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin: no such file or directory

$sudo gem install cocoapods

ERROR:  SSL verification error at depth 0: certificate has expired (10)

ERROR:  Certificate /C=CN/ST=ZheJiang/L=HangZhou/O=Alibaba (China) Technology Co., Ltd./CN=*.taobao.org expired at 2017-11-26T01:50:11Z

ERROR:  SSL verification error at depth 0: certificate has expired (10)

ERROR:  Certificate /C=CN/ST=ZheJiang/L=HangZhou/O=Alibaba (China) Technology Co., Ltd./CN=*.taobao.org expired at 2017-11-26T01:50:11Z

ERROR:  SSL verification error at depth 0: certificate has expired (10)

ERROR:  Certificate /C=CN/ST=ZheJiang/L=HangZhou/O=Alibaba (China) Technology Co., Ltd./CN=*.taobao.org expired at 2017-11-26T01:50:11Z

ERROR:  Could not find a valid gem 'cocoapods' (>= 0), here is why:

Unable to download data from https://ruby.taobao.org/ - SSL_connect returned=1 errno=0 state=error: certificate verify failed (https://ruby.taobao.org/specs.4.8.gz)

ERROR:  SSL verification error at depth 0: certificate has expired (10)

ERROR:  Certificate /C=CN/ST=ZheJiang/L=HangZhou/O=Alibaba (China) Technology Co., Ltd./CN=*.taobao.org expired at 2017-11-26T01:50:11Z


A:

$which pod

/usr/local/bin/pod

$sudo rm -rf 路径


gem sources -l

gem sources --remove https://ruby.taobao.org/

用官方的

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

sudo gem install cocoapods


Enjoy pod!

你可能感兴趣的:(CocoaPods not working in macOS High Sierra)