-2

When I try to install Cocoapods using sudo gem install cocoapods, I get the follow error output:

enter image description here

This is happening on a MacBook Pro with an M1 chip.

HangarRash
  • 7,314
  • 5
  • 5
  • 32
  • Is anyone help answer me? – Yen Pheayuth Nov 11 '22 at 15:59
  • 2
    Copy/paste output, not only screenshot. did you look at tthe mkmf.log file? Did you look for that error? https://stackoverflow.com/questions/20939568/error-error-installing-cocoapods-error-failed-to-build-gem-native-extension ? – Larme Nov 11 '22 at 16:19
  • You're using the system ruby. Don't. It's really as simple as that. – matt Nov 11 '22 at 21:56
  • Oh, and if you have to say `sudo` you're doing it wrong. – matt Nov 11 '22 at 22:09

1 Answers1

1

Do this, with M1 chipset you need to use home brew instead gem

sudo gem uninstall cocoapods
brew install cocoapods
M.Argumedo
  • 181
  • 1
  • 3
  • 9