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:
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:
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.
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 )
brew link
step did not complete successfully
The formula built,........, command $ brew link --overwrite cocoapodsMy operating system is macOS Big Sur.
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.
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 :(
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.
© 2022 - 2024 — McMap. All rights reserved.