I was looking into the web for some updated answer about my problem but I couldn’t find it!
I install Cocoapods using the terminal with the command below:
Sudo gem install cocoapods
Which installed me the latest version (1.11.3), the problem was the incompatibility with M1 (like we know). I tried with Homebrew and everything is working fine but I saw that the version is the same than using sudo gem…
So… Why sudo gem install Cocoapods
doesn’t work?
Is cocoapods current unavailable for m1 in 2022?
2
Answers
There is a problem with built in ruby in Macos for the m1 as it has become deprecated after Catalina (10.15).
A possible solution is to use
Homebrew
which has the updated ruby for the m1 chip.Or as @Gereon mentioned in the comment section, you can use rbenv.
You can try to run terminal via Rosetta, or just add arch -x86_64 before any other command. For example, use
instead of