Flutter Doctor CocoaPods not installed
Asked Answered
E

6

8

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

Ecg answered 30/9, 2020 at 19:5 Comment(0)
H
11

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.

Hematuria answered 18/4, 2021 at 21:19 Comment(1)
I had to run the command: brew link --overwrite cocoapods after running the installation through brewMotive
P
4

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.

Pointenoire answered 8/3, 2022 at 17:1 Comment(0)
A
1

Under the Apple M1 model, if you do not need rvm and gem, you can execute

brew install cocoapods 

to install cocoapods directly. Of course, if you have Homebrew, if not, please install Homebrew first.

Adelleadelpho answered 27/10, 2023 at 13:32 Comment(0)
S
0

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.

Staffard answered 30/9, 2020 at 21:59 Comment(2)
Thanks. The error that I am getting after trying to run my flutter app is that CocoaPods is not installed. Please note that I have tried running both sudo gem install cocoapods and sudo gem install ruby.Ecg
Please see the newly added picture above.Ecg
S
0

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 :(

Sufflate answered 23/3, 2021 at 13:1 Comment(0)
M
0

For all the people who are running in the same issue and I think there are still a ton of them out there:

The only thing that have helped me, was updating gem itself with

sudo gem update --system

And then uninstall cocoapods and reinstall it right away

sudo gem uninstall cocoapods && sudo gem install cocoapods

After that flutter worked just how it supposed to be.

Before that I tried so many things with brew and gem and all the stuff you're going to find on the internet. Would have loved to see this simple solution days ago.

Monastery answered 9/8 at 10:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.