I'm not able to install Cocoapods in context with setting up React Native environment on my M1 Silicon due to below error.
M1, 2020 MacOs Big Sur 11.3.1 X-Code 13.2.1
jonas@Air-von-Jonas ~ % sudo gem install cocoapods
Building native extensions. This could take a while...
ERROR: Error installing cocoapods:
ERROR: Failed to build gem native extension.
current directory: /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.5/ext/ffi_c
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby -I /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0 -r ./siteconf20220424-55001-og2rl2.rb extconf.rb
checking for ffi.h... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.
I already tried all of these, these, the official cocoapod guide and also tried the official React-Native hints.