-1

I am unable to install cocoapods on my mac. I use Mac OS Monterey. What do I need to do? I try to install with: sudo gem install cocoapods This is the error I get:

ERROR:  Loading command: install (LoadError)
    dlopen(/Library/Ruby/Gems/2.6.0/gems/date-3.3.3/lib/date_core.bundle, 0x0009): tried: '/Library/Ruby/Gems/2.6.0/gems/date-3.3.3/lib/date_core.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')) - /Library/Ruby/Gems/2.6.0/gems/date-3.3.3/lib/date_core.bundle
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
Ben Ajax
  • 668
  • 2
  • 13
  • 27

1 Answers1

0

This is because you have a Mac with an M1 or M2 chip. they have a different architecture, (ARM, instead of x86_64, or the other way around). I think believe you have the M1 chip, then you need to follow the answers here: How to run CocoaPods on Apple Silicon (M1)

If you have an older (intel) chip. You can search specifically for that.

Mister_CK
  • 668
  • 3
  • 13