I am currently getting this issue when installing podfile. I've been trying to install pod install, but It keeps failing. The error message is below.
You may have encountered a bug in the Ruby interpreter or extension libraries. Bug reports are welcome. For details: https://www.ruby-lang.org/bugreport.html [IMPORTANT] Don't forget to include the Crash Report log file under DiagnosticReports directory in bug reports. enter image description here
M1 is compatible to arm, so when performing arch related commands, it is operated under arm64. so an architecture will be set to x86_64 to install ffi.
sudo arch -x86_64 gem install ffi
M1 should indicates x86_64 when installing pod on M1 Macbook, cause to be synchronize on an architecture.
arch -x86_64 pod install
follow steps
remove the pod
$ sudo gem install cocoapods-deintegrate cocoapods-clean
$ pod deintegrate
$ pod cache clean --all
$ rm Podfile
2.Install pod
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
If using M1 and don't want to enter arch -x86-64
everytime, you can use this command to install ffi
instead:
gem install --user-install ffi -- --enable-libffi-alloc
And then it should be able to run pod install
without it. Using sudo
might be needed.
Open applications folder and find Terminal in Utilities folder and right click on it and select get info and check Open Using Rosetta
Then follow the regular intel cocoapod installation it will work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.