4

I'm using Macbook pro-2020 apple M1 Chip, I have created a new ReactNative project and it runs fine on the simulator but if i have to install any other plugins, and have to install pods. it gives me errors like this.

enter image description here

i have installed all the requirements app running fine but once it comes pod installs it fails each and every time. any help would be much appericiated.

Atiq Ur Rehman
  • 1,065
  • 1
  • 15
  • 34

2 Answers2

1

I believe this has been answered in how-to-running-cocoapods-on-apple-silicon-m1

I recommend following the updated answer for 2022. If you haven't already, use Homebrew, even tho it's not recommended by the maintainers. M1 with ARM architecture is amazing but many libraries are still not compatible and need to be run in x86 mode.

I would uninstall everything, including and gems you used originally, and run the following Homebrew commands and link them all....

  • brew install node
  • brew install yarn
  • brew install cocoapods

Reinstalling those should now work when you run pod install inside your ios file. This is what worked for me. Hope this helps.

Kelvin
  • 629
  • 7
  • 8
1

I was facing the same error, this is what worked for me:

I first reinstalled the node, yarn, CocoaPods, after that I run the following commands:

  • brew link cocoapods

If still gives you error, remove old linked pod using following command:

  • rm '/opt/homebrew/bin/pod'

Now run this command again:

  • brew link cocoapods

Once the above command works successfully, then move to your project's iOS folder and run the following command:

  • pod install
halfer
  • 19,824
  • 17
  • 99
  • 186
Gautam Shrivastav
  • 1,198
  • 1
  • 9
  • 22