18

When I try to install modules using pod install command in directory ios of react native project, I get the following error:

LoadError - incompatible library version - /Users/user/gems/gems/ffi-1.13.1/lib/ffi_c.bundle

How can I fix it so that my command is executed successfully? To solve this problem I tried to uninstall ffi-1.13.1 and tried to install versions ffi-1.13.0, ffi-1.12 and do the command pod install again. The same error was displayed. Also issues were opened in Github repositories CocoaPods, React Native Mapbox

designervoid
  • 334
  • 4
  • 10

3 Answers3

8

Use the below command

gem install ffi

This fixed the same issue in my system (Big Sur)

Sven Eberth
  • 3,057
  • 12
  • 24
  • 29
Salini Roni
  • 81
  • 1
  • 2
1

The error for me occured after changing/uninstalling my Ruby version.

Try this:

  1. Install rvm (if you don't have it) \curl -sSL https://get.rvm.io | bash
  2. install latest ruby (3.0.0p0) rvm install ruby@latest and set it as default rvm use ruby-3.0.0 --default
  3. A few times install cocoapods gem install cocoapods
  4. pod install
shiraz27
  • 1,898
  • 18
  • 14
0

After the setup here, just restart your pc, I somehow got it working after several errors, updating and resources here, I just have to restart my pc and the error stopped.