Flutter Doctor CocoaPods not installed

Viewed 3179

When I run Flutter doctor: enter image description here

I have tried to run sudo gem install cocoapods to install it but still the same issue.

Please not that I am running xcode 12 with the newest flutter version in the dev channel.

Any ideas?

Error after running the flutter build:

enter image description here

4 Answers

What worked for me was to uninstall Cocoapods using sudo gem uninstall cocoapods and using Homebrew instead brew install cocoapods. P.s. I'm using an M1 Macbook.

Are you getting an error when you tried to sudo gem install cocoapods? I had to do sudo gem install ruby first to make it work on my Mac.

In my case the problem was that there was no ruby installation on my mac after a clean install of MacOSX Catalina. So what I did, was first to install Ruby Version Manager with this command:

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

The RVM installed Ruby on my system along with other dependencies. After that I was able to install cocoapods with the recommended command:

sudo gem install cocoapods

and it worked flawlessly for me after that. Hope this helps. It seems that Apple has removed many developer tools lately from its systems, Ruby being one of them :(

I had the same problem and after hours of looking for a solution, I solved it with these steps: (prerequisites: install homebrew first. To check if installed, in your terminal, type $ brew -v )

  1. $ sudo gem uninstall cocoapods (skip this part if cocoapods is not installed. command $pod --version , will tell you if it's installed or not)
  2. $ brew install cocoapods
  3. If there's an error 'The brew link step did not complete successfully The formula built,........, command $ brew link --overwrite cocoapods
  4. $ brew reinstall cocoapods
  5. $ flutter run

My operating system is macOS Big Sur.

Related