'How to fix error Ruby when bundle exec pod repo update

bundle exec pod install work correctly

but when run ' bundle exec pod repo update' it shows an error like below

What should i do with this error?

Error

LoadError - dlopen(/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/ffi-1.15.3/lib/ffi_c.bundle, 9): no suitable image found.  Did find:
    /Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/ffi-1.15.3/lib/ffi_c.bundle: mach-o, but wrong architecture
    /Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/ffi-1.15.3/lib/ffi_c.bundle: mach-o, but wrong architecture - /Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/ffi-1.15.3/lib/ffi_c.bundle
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/ffi-1.15.3/lib/ffi.rb:5:in `require'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/ffi-1.15.3/lib/ffi.rb:5:in `rescue in <top (required)>'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/ffi-1.15.3/lib/ffi.rb:2:in `<top (required)>'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/ethon-0.14.0/lib/ethon.rb:3:in `require'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/ethon-0.14.0/lib/ethon.rb:3:in `<top (required)>'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `require'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:440:in `require'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:440:in `download_typhoeus_impl_async'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:372:in `download_and_save_with_retries_async'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:365:in `download_file_async'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:338:in `download_file'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:78:in `deprecated_local_podspecs'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:60:in `preheat_existing_files'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:257:in `update'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:135:in `block (3 levels) in update'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:134:in `block (2 levels) in update'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:133:in `each'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:133:in `block in update'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:131:in `open'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:131:in `update'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/command/repo/update.rb:23:in `run'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/bin/pod:23:in `load'
/Users/162408.suryadi/.rvm/gems/ruby-2.0.0-p247/ruby/3.0.0/bin/pod:23:in `<top (required)>'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/bundler-2.2.25/lib/bundler/cli/exec.rb:63:in `load'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/bundler-2.2.25/lib/bundler/cli/exec.rb:63:in `kernel_load'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/bundler-2.2.25/lib/bundler/cli/exec.rb:28:in `run'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/bundler-2.2.25/lib/bundler/cli.rb:481:in `exec'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/bundler-2.2.25/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/bundler-2.2.25/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/bundler-2.2.25/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/bundler-2.2.25/lib/bundler/cli.rb:31:in `dispatch'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/bundler-2.2.25/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/bundler-2.2.25/lib/bundler/cli.rb:25:in `start'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/bundler-2.2.25/exe/bundle:49:in `block in <top (required)>'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/bundler-2.2.25/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
/opt/homebrew/lib/ruby/gems/3.0.0/gems/bundler-2.2.25/exe/bundle:37:in `<top (required)>'
/opt/homebrew/opt/ruby/bin/bundle:25:in `load'
/opt/homebrew/opt/ruby/bin/bundle:25:in `<main>'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2FUsers%2F162408.suryadi%2F.rvm%2Fgems%2Fruby-2.0.0-p247%2Fruby%2F3.0.0%2Fgems%2Fffi-1.15.3%2Flib%2Fffi_c.bundle%2C+9%29%3A+no+suitable+image+found.++Did+find%3A%0A%09%2FUsers%2F162408.suryadi%2F.rvm%2Fgems%2Fruby-2.0.0-p247%2Fruby%2F3.0.0%2Fgems%2Fffi-1.15.3%2Flib%2Fffi_c.bundle%3A+mach-o%2C+but+wrong+architecture%0A%09%2FUsers%2F162408.suryadi%2F.rvm%2Fgems%2Fruby-2.0.0-p247%2Fruby%2F3.0.0%2Fgems%2Fffi-1.15.3%2Flib%2Fffi_c.bundle%3A+mach-o%2C+but+wrong+architecture+-+%2FUsers%2F162408.suryadi%2F.rvm%2Fgems%2Fruby-2.0.0-p247%2Fruby%2F3.0.0%2Fgems%2Fffi-1.15.3%2Flib%2Fffi_c.bundle&type=Issues



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source