解决Mac系统升级导致cocoapods失效问题
2018-10-12 本文已影响6人
白石洲霍华德
使用pod install出现如下错误
-bash: /usr/local/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory
这是Mac升级系统导致,当你的Mac系统升级为 high siera的时候,别忘记更新cocoapods。
解决办法
1.先执行下面两行代码:
1.sudo gem sources -r https://rubygems.org
2.sudo gem sources -a http://rubygems.org
2.执行过程如下:
1 boai:~ boai$ sudo gem sources -r https://rubygems.org
2 source https://rubygems.org not present in cache
3 boai:~ boai$ sudo gem sources -a http://rubygems.org
4 https://rubygems.org is recommended for security over http://rubygems.org
5
6 Do you want to add this insecure source? [yn] y
最后会提示
Do you want to add this insecure source? [yn]
你选择 y就行了
然后出现:
http://rubygems.org added to sources
这就说明成功了