Running Cocoapods on Apple Silicon (M1)
EDIT: I recently disabled Rosetta, and Cocoapods runs just fine with the addition of the ffi gem.
For anyone else struggling with this issue, I just found a way to solve it. In addition to running terminal in Rosetta:
- Right-click on Terminal in Finder
- Get Info
- Open with Rosetta
I installed a gem that seems to be related to the symbol not found in the error:
sudo gem install ffi
After doing this, cocoapods runs as expected.
Updated on 2021 February
# Install ffi
sudo arch -x86_64 gem install ffi
# Re-install dependency
arch -x86_64 pod install
to install completely cocoapods on Mac with M1 chip (Apple Silicon), please follow those steps:
- Duplicate the Terminal application in the Utilities folder.
- Right click on the app and choose Get Info.
- Rename the other version of the app as you like.
- Check the option "open with Rosetta".
- Install Cocoapods with the command "sudo gem install cocoapods"
- Type the command line "gem install ffi" to fix the ffi bundle problem. Now you can do a "pod install" without problem.
Source : iPhoneSoft