【command not found: pod】cocoapos出错

发布于 2022-09-01 20:03:04 字数 1307 浏览 13 评论 0

Mac OS更新到10.11 pod update就出错了,o(╯□╰)o。

➜ ~ pod update
zsh: command not found: pod
➜ ~ gem sources -l

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:205:in `parse': (<unknown>): could not find expected ':' while scanning a simple key at line 11 column 1 (Psych::SyntaxError)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:205:in `parse_stream'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:153:in `parse'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/psych.rb:129:in `load'
from /Library/Ruby/Site/2.0.0/rubygems/config_file.rb:333:in `load_file'
from /Library/Ruby/Site/2.0.0/rubygems/config_file.rb:198:in `initialize'
from /Library/Ruby/Site/2.0.0/rubygems/gem_runner.rb:74:in `new'
from /Library/Ruby/Site/2.0.0/rubygems/gem_runner.rb:74:in `do_configuration'
from /Library/Ruby/Site/2.0.0/rubygems/gem_runner.rb:39:in `run'
from /usr/bin/gem:21:in `<main>'

gem uninstall cocoapods
gem sources -l

同样出现如上提示错误,难道是Ruby的问题。

pod --version
zsh: command not found: pod

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

樱&纷飞 2022-09-08 20:03:04

终于搞定,就是Ruby的问题,我重新安装了RVM,另淘宝的镜像换成Https了,记得更改镜像

如:

➜  ~  gem source -l             
*** CURRENT SOURCES ***

https://rubygems.org/

安装RVM

\curl -sSL https://get.rvm.io | bash

终于找回这货,o(╯□╰)o

➜  ~  pod --version
0.39.0

参考:
https://rvm.io/rvm/install
http://stackoverflow.com/questions/21663876/cocoapods-install

毁梦 2022-09-08 20:03:04

Try the following command on OS X El Capitan
sudo gem install -n /usr/local/bin cocoapods

https://github.com/CocoaPods/CocoaPods/issues/3736

May be help~

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文