ruby 如何删除Mac上的Cocoapods

xxls0lw8  于 12个月前  发布在  Ruby
关注(0)|答案(1)|浏览(152)

当我运行flutter doctor(MacOS索诺马)时,它告诉我安装了cocoapods

[!] Xcode - develop for iOS and macOS (Xcode 15.0)
    ✗ CocoaPods installed but not working.
        You appear to have CocoaPods installed but it is not working.
        This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
        This can usually be fixed by re-installing CocoaPods.
      To re-install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

但当我试图删除它:

george@mycomputer % sudo gem uninstall cocoapods
Gem 'cocoapods' is not installed
george@mycomputer % sudo gem uninstall -n /usr/local/bin cocoapods
Gem 'cocoapods' is not installed
george@mycomputer ~ % brew uninstall cocoapods
Error: Cask 'cocoapods' is not installed.

椰子还能在哪里/怎么样,以及如何去除它?

7kjnsjlb

7kjnsjlb1#

当我试图使用RubyGems更新到最新版本的Cocoapods时,我在最新的操作系统索诺马上发现了类似的问题。
对我有用的是使用homebrew CLI。
https://brew.sh/
安装homebrew并运行以下命令

brew卸载cocoapods

然后在你的主文件夹中删除所有对cocoapods的引用

rm -rf ~/.cocoapods/

相关问题