【问题标题】:Having trouble updating cocoapods?更新 cocoapods 时遇到问题?
【发布时间】:2020-11-29 13:49:00
【问题描述】:

当我尝试在命令行中使用 sudo gem install cocoapods 更新 cocoapods 时(如颤振医生的建议),它说它已成功安装:

$ sudo gem install cocoapods
Fetching cocoapods-1.9.3.gem
Successfully installed cocoapods-1.9.3
Parsing documentation for cocoapods-1.9.3
Installing ri documentation for cocoapods-1.9.3
Done installing documentation for cocoapods after 2 seconds
1 gem installed

但是当我使用 pod --version 检查 cocoapods 版本时,它返回 1.2.0,这是我使用的旧版本的 cocoapods。另外flutter医生告诉我还是要更新cocoapods:

CocoaPods 1.2.0 out of date (1.8.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to
        your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade:
        sudo gem install cocoapods

我最近也刚刚将 Ruby 更新到 2.6.3,我不确定这是否与问题有关。

我已经尝试了几乎所有可以在互联网上找到的解决方案,包括

sudo gem install cocoapods
sudo gem install cocoapods
pod setup
brew upgrade cocoapods
brew install cocoapods
brew reinstall cocoapods
sudo gem uninstall cocoapods
sudo gem install cocoapods
sudo gem install -n /usr/local/bin cocoapods

这些都不适合我。我真的被困住了。任何帮助将不胜感激,谢谢!

【问题讨论】:

  • 尝试使用 sudo gem which cocoapodssudo gem list cocoapods 查看所有版本的 gem。

标签: ruby flutter cocoapods


【解决方案1】:

你可以试试下面的cmd来更新某些版本(比如1.10.0):

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

然后用pod --version检查版本。

祝你有美好的一天!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-11-10
    • 2021-04-07
    • 1970-01-01
    • 2013-11-03
    • 2021-04-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多