Cocoapods: pod install fails on Apple Silicone M1 Mac

Created on 24 Nov 2020  路  3Comments  路  Source: CocoaPods/CocoaPods

Report

What did you do?

Run pod install on a MacBook Air with M1.

What did you expect to happen?

Install all pod dependencies correctly.

What happened instead?

LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.12.2/lib/ffi_c.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/ffi-1.12.2/lib/ffi_c.bundle - /Library/Ruby/Gems/2.6.0/gems/ffi-1.12.2/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'

CocoaPods Environment

Stack

   CocoaPods : 1.10.0
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]
    RubyGems : 3.0.3
        Host : macOS 11.0.1 (20B29)
       Xcode : 12.2 (12B45b)
         Git : git version 2.24.3 (Apple Git-128)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : cocoapods - git - https://github.com/CocoaPods/Specs @ 9eb5851a030ff0171d18508d3cb94c85a7bfb9f1

               trunk - CDN - https://cdn.cocoapods.org/

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-stats       : 1.1.0
cocoapods-trunk       : 1.4.1
cocoapods-try         : 1.1.0

Podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'App' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for App
  pod 'Amplify'
  pod 'AmplifyPlugins/AWSPinpointAnalyticsPlugin'
  pod 'AmplifyPlugins/AWSCognitoAuthPlugin'

end

Most helpful comment

I also encountered this issue while following the Ionic getting started tutorial on a Macbook Air with M1 chip. This workaround got me passed the issue but I suppose folks with more macos/ios dev experience can provide additional help.

All 3 comments

I also encountered this issue while following the Ionic getting started tutorial on a Macbook Air with M1 chip. This workaround got me passed the issue but I suppose folks with more macos/ios dev experience can provide additional help.

@randychampagne many thanks, that works.

This seems an issue with installing ffi gem on M1. At this time cocoapods depends on ffi gem but we are hoping to remove it in a future version which is the only thing that would circumvent this issue.

In the meantime please seek out alternatives on how to successfully install ffi gem within M1 environment.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

steffendsommer picture steffendsommer  路  3Comments

sonu5 picture sonu5  路  3Comments

pallaviMN picture pallaviMN  路  3Comments

dawnnnnn picture dawnnnnn  路  3Comments

Curtis-Halbrook picture Curtis-Halbrook  路  3Comments