CocoaPods : 1.10.1
Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]
RubyGems : 3.0.3
Host : macOS 11.2.3 (20D91)
Xcode : 12.4 (12D4e)
Git : git version 2.24.3 (Apple Git-128)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories :
Installation Source
Executable Path: /usr/local/bin/pod
Plugins
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-trunk : 1.5.0
cocoapods-try : 1.2.0
Podfile
platform :ios, '12.0'
target 'Todoey' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Pods for MyRealmProject
pod 'RealmSwift', '=10.1.4'
Project that demonstrates the issue
Error
LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi.rb:6:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi.rb:3:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ethon-0.12.0/lib/ethon.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:74:in `cdn_url?'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:36:in `create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:21:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:178:in `block in sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:177:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:177:in `sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1073:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
this is the project I cloned
https://github.com/appbrewery/Todoey-iOS13.git
dadvir, satyasahu79, fredvollmer, jisungbin, davidseek, mannysz, KhinPhone060, Sammius, NomanGul, MikePendo, and 19 more reacted with thumbs up emoji
NomanGul and janderson-souza reacted with heart emoji
All reactions
skinnynpale, msi753, ln-12, Rupesh-kus, manitaggarwal, doyeon326, satyasahu79, bkalmuk, fredvollmer, alikhil, and 33 more reacted with thumbs up emoji
kundan0012 reacted with thumbs down emoji
All reactions
do you have a MacBook Pro with a M1 processor? this fixed my issue:
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
Nathan-L256, skinnynpale, Milutin-P, unnamedd, TheVigor, Channe, msi753, ln-12, brainer3220, milesziemer, and 558 more reacted with thumbs up emoji
jacmacmod, jesper-bylund, rhysturner, vivekvt, mTdev1, mallaprechristian, razorsyntax, WhiteHyun, kundan0012, johlamie, and 32 more reacted with thumbs down emoji
jisungbin, DevChris1314, Duchv2008, hamidpak013, ufukomer, raphaelssampaio, andyrobert3, wapznw, Thomas06000, Arenukvern, and 24 more reacted with laugh emoji
nirajjoshi, Clearcazter, invoiss-inc, guvenkaranfil, jesper-bylund, du5rte, bekatd, ToadRider, Eiphoria6237, RbrtDdds, and 101 more reacted with hooray emoji
serena-yu17 and eng-tharaa98 reacted with confused emoji
TheVigor, hartac, jumandika, Liroy-Barzillai, stanislav-sidorov-empeek, rcerrejon, bagdevich, imthumbelina, alimtunc, demendn, and 156 more reacted with heart emoji
takumi0107, expdani, KayhanB, baytkod, kssce, andrueandersoncs, BboyEcuachi, bgeisb, marcusjribeiro, berkayyildiz, and 88 more reacted with rocket emoji
bgeisb, ithustle, jisungbin, marthasharpe, Duchv2008, raphaelssampaio, andyrobert3, KunwardeepSingh3, tnt-hsopjani, WiRight, and 14 more reacted with eyes emoji
All reactions
I have MBP M1 Pro. I saw @rudyjdr answer and I modified it a bit.
in regular terminal:
sudo arch -x86_64 gem install ffi
then in the project root
cd ios && arch -x86_64 pod install && cd ../
I also had to delete Flipper lines in ios/Podfile
to get the app running. (But that's probably not related to your problem)
jeniasaigak, Qinhank, yinfurong-dev, 3abdawy, AndersonCMelo, JCFlores915, ElinaMaleksa, joacooribe, martipello, gino8080, and 87 more reacted with thumbs up emoji
kundan0012, felix-ht, SGarcia710, hanifmhd, IFanDre, garrettlove8, PierreEhab, ayemyathu-meta-retail, GabrieleGigante, Yoshikuni-Morita, and Ramzil11 reacted with thumbs down emoji
3abdawy, JCFlores915, andyrobert3, LinFeiLong, leodeutsch, flyingkitlets, Rujitsuki, votsuk, bcbcbcbcbcl, Schabaani, and 6 more reacted with hooray emoji
elprogram, vborbely, NomanGul, terencevision, jessicatarra, joshuaellis, isadoraoliv, mahmut-gundogdu, leodeutsch, flyingkitlets, and 17 more reacted with heart emoji
All reactions
To those lazy like me, an alias for the arch -x86_64
. Add it in your ~/.bash_profile
, ~/.bashrc
or ~/.zshrc
:
# Intel Platform
alias intel="arch -x86_64"
How to use:
bonfimtm, hooshyar, estevg, 7772, husky-dev, r3nya, 7alip, metin-ozturk, McPatto, StoyanD, and 60 more reacted with thumbs up emoji
kundan0012, IFanDre, mostafaberg, and prathvi-scopely reacted with thumbs down emoji
amiralidev, ErickCamposDev, aprilzero, berkayyildiz, 7772, ChrisLeNeve, OrlSan, tillchen, NomanGul, euharrison, and 7 more reacted with laugh emoji
GRA0007, kmphua, christopherMills, jsahoo, dadvir, LeslieOA, seobaeksol, akaashkolluri, jr00n, rennn2002, and 51 more reacted with heart emoji
thawdezin reacted with eyes emoji
All reactions
I'm also getting the same error as i've new macbook pro M1 chip a day back and i'm trying to set my repo and figuring it out to find the solution. Any advise is much appreciated and very helpful.
I ran this command "arch -x86_64 pod install" after setting the terminal as Rossetta and got the following errors.
[!] /bin/bash -c
set -e
#!/bin/bash
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
set -e
PLATFORM_NAME="${PLATFORM_NAME:-iphoneos}"
CURRENT_ARCH="${CURRENT_ARCH}"
if [ -z "$CURRENT_ARCH" ] || [ "$CURRENT_ARCH" == "undefined_arch" ]; then
# Xcode 10 beta sets CURRENT_ARCH to "undefined_arch", this leads to incorrect linker arg.
# it's better to rely on platform name as fallback because architecture differs between simulator and device
if [[ "$PLATFORM_NAME" == *"simulator"* ]]; then
CURRENT_ARCH="x86_64"
CURRENT_ARCH="armv7"
export CC="$(xcrun -find -sdk $PLATFORM_NAME cc) -arch $CURRENT_ARCH -isysroot $(xcrun -sdk $PLATFORM_NAME --show-sdk-path)"
export CXX="$CC"
# Remove automake symlink if it exists
if [ -h "test-driver" ]; then
rm test-driver
./configure --host arm-apple-darwin
# Fix build for tvOS
cat << EOF >> src/config.h
/* Add in so we have Apple Target Conditionals */
#ifdef __APPLE__
#include <TargetConditionals.h>
#include <Availability.h>
#endif
/* Special configuration for AppleTVOS */
#if TARGET_OS_TV
#undef HAVE_SYSCALL_H
#undef HAVE_SYS_SYSCALL_H
#undef OS_MACOSX
#endif
/* Special configuration for ucontext */
#undef HAVE_UCONTEXT_H
#undef PC_FROM_UCONTEXT
#if defined(__x86_64__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__rip
#elif defined(__i386__)
#define PC_FROM_UCONTEXT uc_mcontext->__ss.__eip
#endif
# Prepare exported header include
EXPORTED_INCLUDE_DIR="exported/glog"
mkdir -p exported/glog
cp -f src/glog/log_severity.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/raw_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/stl_logging.h "$EXPORTED_INCLUDE_DIR/"
cp -f src/glog/vlog_is_on.h "$EXPORTED_INCLUDE_DIR/"
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for arm-apple-darwin-strip... no
checking for strip... strip
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for arm-apple-darwin-gcc... /Library/Developer/CommandLineTools/usr/bin/cc -arch armv7 -isysroot
checking whether the C compiler works... no
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: SDK "iphoneos" cannot be located
xcrun: error: unable to lookup item 'Path' in SDK 'iphoneos'
/Users/xxx/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-1f3da/missing: Unknown `--is-lightweight' option
Try `/Users/xxx/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-1f3da/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
configure: error: in `/Users/xxx/Library/Caches/CocoaPods/Pods/External/glog/2263bd123499e5b93b5efe24871be317-1f3da':
configure: error: C compiler cannot create executables
See `config.log' for more details
Found the solution:
After running the above command "arch -x86_64 pod install" and if it didn't work and gave the above error.
Please run the following in the terminal which will fix the issue.
sudo xcode-select --switch /Applications/Xcode.app
airman5573, Power186, liudhzhyym, abbaxee, andyrobert3, DevanshiGor, Arenukvern, rogeriodeandradepires, NomanGul, no5ugar, and 33 more reacted with thumbs up emoji
airman5573, Power186, abbaxee, andyrobert3, rogeriodeandradepires, NomanGul, raneaniket007-personal, eltonbrayner, sarevok89, HasanShehryarJaffri, and 6 more reacted with hooray emoji
airman5573, abbaxee, andyrobert3, rogeriodeandradepires, NomanGul, guiprais, raneaniket007-personal, mrcodesuit, eltonbrayner, mvmcorrea, and 13 more reacted with heart emoji
siyahulhaq, sarevok89, HasanShehryarJaffri, Fred-Reis, LucNguyen98, Roamer77, vadamk, jagajastic, and MaiconGilton reacted with rocket emoji
All reactions
To those lazy like me, an alias for the arch -x86_64
. Add it in your ~/.bash_profile
, ~/.bashrc
or ~/.zshrc
:
# Intel Platform
alias intel="arch -x86_64"
How to use:
Can you give more info on how to do this? I created a text file named .zshrc in my home directory and typed what you shared and saved it but when I run intel pod install I get the error that zsh common not found: intel
Can you give more info on how to do this? I created a text file named .zshrc in my home directory and typed what you shared and saved it but when I run intel pod install I get the error that zsh common not found: intel
For those coming after and having the same problem as @OmranK, I forgot to mention that after add anything on those resource files, you need to restart the instance of your terminal or re-execute them, i.e:
do you have a MacBook Pro with a M1 processor? this fixed my issue:
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
this solved my problem! thanks
Hi Guys, sorry but I am new here... what means arch -x86_64?
Are you sure there is not any problem using it?
Why do we have to use something related to x86 architeture in a Macbook with M1 processor.
Thanks for your help everyone!
@cmagnoss
arch -x86_64 means running Terminal in Rosetta 2.
Rosetta is a translation process that allows users to run apps that contain x86_64 instructions on Apple silicon.
Here is more details about Rosetta2.
https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment.
The reason why we use Rosetta2 is that Cocoapods don’t yet support the arm64 architecture.
You can use two Homebrew. One for the arm, the other for x86.
like this...
for arm...
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
I reinstalled CocoaPods with Brew like in this video: https://www.youtube.com/watch?v=U8iofjQyf5A and it worked!
Afterwards I was able to install any pods to my projects
sohailykhan94, othaimeen, James-Coleman, imamrobani, and jyan840 reacted with thumbs up emoji
sohailykhan94, johanjq, pankajparkar, and jyan840 reacted with heart emoji
efratyos and jyan840 reacted with rocket emoji
All reactions
do you have a MacBook Pro with a M1 processor? this fixed my issue:
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
This provided the perfect solution! Thanks so much.
jingyile, kyaox, 0x0sky, VuduVations, jeremytenjo, and sipamungkas reacted with heart emoji
0x0sky reacted with rocket emoji
All reactions
do you have a MacBook Pro with a M1 processor? this fixed my issue:
sudo arch -x86_64 gem install ffi
arch -x86_64 pod install
this solved my problem! thanks
if this does not work after running these steps. run "arch -x86_64 pod install --repo-update". This worked for me!
Larpoux, markszente, bingbingshao, nevinchanyi, Aziz-cs, Hitsu91, kkoless, sleaper, Dan-Crane, moyashi-ikasui, and 13 more reacted with thumbs up emoji
bingbingshao, Dan-Crane, danw8989, itxtoledo, Zoniaina, and kyung-yeon reacted with hooray emoji
alexn62, Dan-Crane, danw8989, itxtoledo, qlaboudigue, zimnushka, kyung-yeon, and ZubairKh reacted with heart emoji
vivekvt, bingbingshao, mcherag, Dan-Crane, danw8989, itxtoledo, Ricardo385, Zoniaina, guiac, kyung-yeon, and HyopeR reacted with rocket emoji
All reactions
🐛 [firebase_messaging] CocoaPods could not find compatible versions for pod "Firebase/Messaging" M1 chip
firebase/flutterfire#5984
Is it still needed in current versions and native react 0.66?
No it's not. You also don't need to edit your PodFile anymore to configure flipper or else. At first I could not get "pod install" running. But after updating ruby with brew and setting the path to 3.0 in my ".zshrc" it worked. I just installed everything 5 Minutes ago on my new M1 with MacOS 11.6.1 (Big Sur).
So the issue was pod used the ruby installed on BigSure ruby 2.6.* but u need to use ruby 3.0 because of the ARM support.
Before you started having fun with installing rbenv
, different ruby versions etc.
Cocoapods depends on the system ruby version when it's installed via gem
. System version of ruby crashes. Reinstalling it with brew
makes cocoapods depend on correct version of ruby that is installed automatically as a dependency.
sudo gem uninstall cocoapods
sudo gem uninstall cocoapods-core
sudo gem uninstall cocoapods-try
sudo gem uninstall cocoapods-trunk
sudo gem uninstall cocoapods-search
sudo gem uninstall cocoapods-plugins
sudo gem uninstall cocoapods-downloader
sudo gem uninstall cocoapods-deintegrate
brew install cocoapods
matthewblott, thearusable, phvictorino, hmane, r0b0t3d, jokai-sor, wahidyankf, yuriypavlyshak, 3dmg, fergus-orbach, and 13 more reacted with thumbs up emoji
grantbartone, eliaslecomte, and preetideswal reacted with confused emoji
andixboya and alisani081 reacted with heart emoji
All reactions
I am getting this error, trying to update pod in the react-native application. Rosetta is enabled on this Terminal.
➜ ios arch -x86_64 pod install
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Cloning spec repo `trunk` from `https://cdn.cocoapods.org/`
[!] Unable to add a source with url `https://cdn.cocoapods.org/` named `trunk`.
You can try adding it manually in `/Users/abhishektomar/.cocoapods/repos` or via `pod repo add`.
➜ ios pod install
Analyzing dependencies
Fetching podspec for `DoubleConversion` from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`
Fetching podspec for `RCT-Folly` from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`
Fetching podspec for `boost` from `../node_modules/react-native/third-party-podspecs/boost.podspec`
Fetching podspec for `glog` from `../node_modules/react-native/third-party-podspecs/glog.podspec`
Cloning spec repo `trunk` from `https://cdn.cocoapods.org/`
[!] Unable to add a source with url `https://cdn.cocoapods.org/` named `trunk`.
You can try adding it manually in `/Users/abhishektomar/.cocoapods/repos` or via `pod repo add`.
James-Coleman, focux, devolaw, kytosai, fergus-orbach, imamrobani, dndvl, chuckdries, QuintonC, aleksoft1, and 11 more reacted with thumbs up emoji
grantbartone, ivanarellano, danielsaidi, bcanozter, yaoandy107, focux, kytosai, fergus-orbach, imamrobani, dndvl, and 6 more reacted with heart emoji
All reactions
@cmagnoss arch -x86_64 means running Terminal in Rosetta 2. Rosetta is a translation process that allows users to run apps that contain x86_64 instructions on Apple silicon. Here is more details about Rosetta2. https://developer.apple.com/documentation/apple-silicon/about-the-rosetta-translation-environment.
The reason why we use Rosetta2 is that Cocoapods don’t yet support the arm64 architecture.
You can use two Homebrew. One for the arm, the other for x86. like this...
for arm...
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
providerのversion up後エラー CocoaPods's specs repository is too out-of-date to satisfy dependencies.
furugenict8/coriander#9
In 2022, I just installed home brew , added this line to my .zshrc export PATH=/opt/homebrew/bin:$PATH
, and then ran brew install cocoapods
.
Now pod install works just fine
kytosai, fergus-orbach, mauricedoepke, n1kk, priithansen, stevejboyer, ludu12, vanniktech, and F0rsaken reacted with thumbs up emoji
kytosai, fergus-orbach, mauricedoepke, and stevejboyer reacted with hooray emoji
Drakeoon, kytosai, fergus-orbach, n1kk, stevejboyer, and F0rsaken reacted with heart emoji
fergus-orbach, stevejboyer, and vanniktech reacted with rocket emoji
All reactions
Install cocoapods via Homebrew will solve this.
In that case, we need not to use Rosetta or even compromise with arch -x86_64
It works for Big Sur now the latest OS
imamrobani, talensjr, realadeel, ludu12, phillipkey, vanniktech, and haifengkao reacted with thumbs up emoji
imamrobani, realadeel, phillipkey, and vanniktech reacted with heart emoji
All reactions
Found the solution: After running the above command "arch -x86_64 pod install" and if it didn't work and gave the above error.
Please run the following in the terminal which will fix the issue. sudo xcode-select --switch /Applications/Xcode.app
do u know what it do??
This works for me.
$ gem install ffi -- --enable-libffi-alloc
(For bundler, set a build config for ffi):
$ bundle config build.ffi --enable-libffi-alloc
# Or run with `config --local` (or `config set --local` for higher version) to set locally in <project_root>/.bundle/config.
# Run `bundle config` to examine if success and correct.
# Force reinstall
$ bundle install --force
No Rosetta, no x86-64, arm64 native.
reference: https://bugs.ruby-lang.org/issues/17988
...this issue was fixed by gem install ffi -- --enable-libffi-alloc
. See #18555 and ffi/ffi#800 (comment)
In 2022, I just installed home brew , added this line to my .zshrc export PATH=/opt/homebrew/bin:$PATH
, and then ran homebrew install cocoapods
.
Now pod install works just fine
@Gene-Dana did you mean to write brew install cocoapods
?
In my case, I had to reinstall Homebrew after opening the Terminal with Rosetta. I installed Homebrew, RVM, and 2.7.2 Ruby version without Rosetta at first, which led me to some issues afterwards.
Here is how I did:
Right clic Terminal from the Application/Utilities folder, Get Info, tick the "Open using Rosetta" box.
Uninstall Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
rm -rf /opt/homebrew/*
sudo rm -rf /opt/homebrew
Reinstall Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Restart terminal
Check Homebrew is working fine: brew doctor
Reinstall openssl: brew install openssl
Install Ruby: rvm install 2.7
Thank you, bro!
Nope this doesn't work for me. I have installed cocoa-pods with brew and it throws me the same for Apple M1 Pro.
Solution: Setting the Command Line Tools in Xcode preference worked for me.
[!] Automatically assigning platform iOS
with version 13.0
on target Fablo
because no platform was specified. Please specify a platform for this target in your Podfile. See https://guides.cocoapods.org/syntax/podfile.html#platform
.
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:160:in require': cannot load such file -- ffi_c (LoadError) from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:160:in
rescue in require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:149:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb:5:in
rescue in <top (required)>'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb:2:in <top (required)>' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon.rb:3:in
<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/typhoeus-1.4.1/lib/typhoeus.rb:2:in <top (required)>' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:440:in
download_typhoeus_impl_async'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:372:in download_and_save_with_retries_async' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:365:in
download_file_async'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:338:in download_file' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:53:in
refresh_metadata'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source.rb:31:in initialize' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:30:in
initialize'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:315:in new' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:315:in
block in source_from_path'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:322:in source_from_path' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in
block in aggregate_with_repos'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in map' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in
aggregate_with_repos'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:26:in aggregate' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:60:in
all'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface/error_report.rb:173:in repo_information' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface/error_report.rb:77:in
stack'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface/error_report.rb:24:in report' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:66:in
report_error'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:396:in handle_exception' from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:337:in
rescue in run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:324:in run' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in
run'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/bin/pod:55:in <top (required)>' from /Users/fablosystem/.gem/ruby/2.6.0/bin/pod:23:in
load'
from /Users/fablosystem/.gem/ruby/2.6.0/bin/pod:23:in <main>' /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require': cannot load such file -- ffi_c (LoadError)
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb:5:in
rescue in <top (required)>'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb:2:in <top (required)>' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon.rb:3:in
<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/typhoeus-1.4.1/lib/typhoeus.rb:2:in <top (required)>' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:440:in
download_typhoeus_impl_async'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:372:in download_and_save_with_retries_async' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:365:in
download_file_async'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:338:in download_file' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:53:in
refresh_metadata'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source.rb:31:in initialize' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:30:in
initialize'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:315:in new' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:315:in
block in source_from_path'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:322:in source_from_path' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in
block in aggregate_with_repos'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in map' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in
aggregate_with_repos'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:26:in aggregate' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:60:in
all'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface/error_report.rb:173:in repo_information' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface/error_report.rb:77:in
stack'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface/error_report.rb:24:in report' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:66:in
report_error'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:396:in handle_exception' from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:337:in
rescue in run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:324:in run' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in
run'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/bin/pod:55:in <top (required)>' from /Users/fablosystem/.gem/ruby/2.6.0/bin/pod:23:in
load'
from /Users/fablosystem/.gem/ruby/2.6.0/bin/pod:23:in <main>' /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require': dlopen(/Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/2.6/ffi_c.bundle, 0x0009): tried: '/Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/2.6/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/2.6/ffi_c.bundle' (no such file), '/Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/2.6/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64')) - /Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/2.6/ffi_c.bundle (LoadError)
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb:3:in
<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon.rb:3:in <top (required)>' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/typhoeus-1.4.1/lib/typhoeus.rb:2:in
<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:440:in download_typhoeus_impl_async' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:372:in
download_and_save_with_retries_async'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:365:in download_file_async' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:338:in
download_file'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:53:in refresh_metadata' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source.rb:31:in
initialize'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:30:in initialize' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:315:in
new'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:315:in block in source_from_path' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:322:in
source_from_path'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in block in aggregate_with_repos' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in
map'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in aggregate_with_repos' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:26:in
aggregate'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:60:in all' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface/error_report.rb:173:in
repo_information'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface/error_report.rb:77:in stack' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface/error_report.rb:24:in
report'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:66:in report_error' from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:396:in
handle_exception'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:337:in rescue in run' from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:324:in
run'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in run' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/bin/pod:55:in
<top (required)>'
from /Users/fablosystem/.gem/ruby/2.6.0/bin/pod:23:in load' from /Users/fablosystem/.gem/ruby/2.6.0/bin/pod:23:in
'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:160:in require': cannot load such file -- ffi_c (LoadError) from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:160:in
rescue in require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:149:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb:5:in
rescue in <top (required)>'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb:2:in <top (required)>' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon.rb:3:in
<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/typhoeus-1.4.1/lib/typhoeus.rb:2:in <top (required)>' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:440:in
download_typhoeus_impl_async'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:372:in download_and_save_with_retries_async' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:365:in
download_file_async'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:338:in download_file' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:53:in
refresh_metadata'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source.rb:31:in initialize' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:30:in
initialize'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:315:in new' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:315:in
block in source_from_path'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:322:in source_from_path' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in
block in aggregate_with_repos'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in map' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in
aggregate_with_repos'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:26:in aggregate' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:60:in
all'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:393:in source_with_url' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/sources_manager.rb:22:in
find_or_create_source_with_url'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:179:in block in sources' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:178:in
map'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:178:in sources' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:1081:in
block in resolve_dependencies'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in section' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:1080:in
resolve_dependencies'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:125:in analyze' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:422:in
analyze'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:244:in block in resolve_dependencies' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in
section'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:243:in resolve_dependencies' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:162:in
install!'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in run' from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in
run'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in run' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/bin/pod:55:in
<top (required)>'
from /Users/fablosystem/.gem/ruby/2.6.0/bin/pod:23:in load' from /Users/fablosystem/.gem/ruby/2.6.0/bin/pod:23:in
'
/Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require': cannot load such file -- ffi_c (LoadError) from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb:5:in rescue in <top (required)>' from /Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb:2:in
<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon.rb:3:in <top (required)>' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/typhoeus-1.4.1/lib/typhoeus.rb:2:in
<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:440:in download_typhoeus_impl_async' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:372:in
download_and_save_with_retries_async'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:365:in download_file_async' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:338:in
download_file'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:53:in refresh_metadata' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source.rb:31:in
initialize'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:30:in initialize' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:315:in
new'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:315:in block in source_from_path' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:322:in
source_from_path'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in block in aggregate_with_repos' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in
map'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in aggregate_with_repos' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:26:in
aggregate'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:60:in all' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:393:in
source_with_url'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/sources_manager.rb:22:in find_or_create_source_with_url' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:179:in
block in sources'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:178:in map' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:178:in
sources'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:1081:in block in resolve_dependencies' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in
section'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:1080:in resolve_dependencies' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:125:in
analyze'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:422:in analyze' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:244:in
block in resolve_dependencies'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in section' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:243:in
resolve_dependencies'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:162:in install!' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in
run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in run' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in
run'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/bin/pod:55:in <top (required)>' from /Users/fablosystem/.gem/ruby/2.6.0/bin/pod:23:in
load'
from /Users/fablosystem/.gem/ruby/2.6.0/bin/pod:23:in <main>' /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require': dlopen(/Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/2.6/ffi_c.bundle, 0x0009): tried: '/Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/2.6/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/2.6/ffi_c.bundle' (no such file), '/Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/2.6/ffi_c.bundle' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64h' or 'x86_64')) - /Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/2.6/ffi_c.bundle (LoadError)
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/ffi-1.17.0-arm64-darwin/lib/ffi.rb:3:in
<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/ethon-0.16.0/lib/ethon.rb:3:in <top (required)>' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Users/fablosystem/.gem/ruby/2.6.0/gems/typhoeus-1.4.1/lib/typhoeus.rb:2:in
<top (required)>'
from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in require' from /Library/Ruby/Site/2.6.0/rubygems/core_ext/kernel_require.rb:85:in
require'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:440:in download_typhoeus_impl_async' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:372:in
download_and_save_with_retries_async'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:365:in download_file_async' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:338:in
download_file'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:53:in refresh_metadata' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source.rb:31:in
initialize'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/cdn_source.rb:30:in initialize' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:315:in
new'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:315:in block in source_from_path' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:322:in
source_from_path'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in block in aggregate_with_repos' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in
map'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:331:in aggregate_with_repos' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:26:in
aggregate'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:60:in all' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/source/manager.rb:393:in
source_with_url'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/sources_manager.rb:22:in find_or_create_source_with_url' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:179:in
block in sources'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:178:in map' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:178:in
sources'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:1081:in block in resolve_dependencies' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in
section'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:1080:in resolve_dependencies' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/analyzer.rb:125:in
analyze'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:422:in analyze' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:244:in
block in resolve_dependencies'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in section' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:243:in
resolve_dependencies'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:162:in install!' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in
run'
from /Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in run' from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in
run'
from /Users/fablosystem/.gem/ruby/2.6.0/gems/cocoapods-1.15.2/bin/pod:55:in <top (required)>' from /Users/fablosystem/.gem/ruby/2.6.0/bin/pod:23:in
load'
from /Users/fablosystem/.gem/ruby/2.6.0/bin/pod:23:in `'.
I git this issue when i hit pod install command on terminal can any one help me to resolve this
Hi @PurvaIOS. There are 2 main issues that I can see from your error log:
You are using the system Ruby that came preinstalled on your Mac. This can cause all kinds of issues.
It looks like you are on an Apple Silicon Mac, and you either installed certain development tools using both Rosetta and without Rosetta, or you transferred your files from an Intel Mac to this Apple Silicon Mac.
Instead of using the system Ruby, I recommend installing Ruby using a version manager, and then you'll be able to install Cocoapods without using sudo
. Here's my step-by-step article for installing Ruby on a Mac that has helped thousands of people like you.