无法在macbook m1上通过bundler安装CoCoapod

nukf8bse  于 2021-09-29  发布在  Java
关注(0)|答案(1)|浏览(568)

此问题已在此处找到答案

在苹果硅上运行Cocoapod(m1)(19个答案)
18天前关门。
我正试图通过bundler在MacBookAir m1上安装cocoapods,我一直收到这个错误。我用的是罗塞塔终端,但没用。

命令:

  1. bundler exec pod install

堆栈:

  1. CocoaPods : 1.10.1
  2. Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580 [universal.x86_64-darwin20]
  3. RubyGems : 3.0.3
  4. Host : macOS 11.4 (20F71)
  5. Xcode : 12.5.1 (12E507)
  6. Git : git version 2.30.1 (Apple Git-130)
  7. Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib

错误

  1. LoadError - dlopen(/Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle, 9): no suitable image found. Did find:
  2. /Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle: mach-o, but wrong architecture
  3. /Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle: mach-o, but wrong architecture - /Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle
  4. /Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ffi-1.15.0/lib/ffi.rb:6:in `require’
  5. /Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ffi-1.15.0/lib/ffi.rb:6:in `rescue in <top (required)>’
  6. /Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ffi-1.15.0/lib/ffi.rb:3:in `<top (required)>’
  7. /Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ethon-0.13.0/lib/ethon.rb:3:in `require
  8. /Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ethon-0.13.0/lib/ethon.rb:3:in `<top (required)>’
  9. /Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `require
  10. /Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>’
  11. /Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:440:in `require
  12. /Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:440:in `download_typhoeus_impl_async’
  13. ...
  14. /Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/exe/bundle:37:in `<top (required)>’
  15. /usr/local/bin/bundle:23:in `load’
  16. /usr/local/bin/bundle:23:in `<main>
nwwlzxa7

nwwlzxa71#

答案可以在这个帖子中找到:stackoverflow.com/a/66556339/1185169
在我的例子中,主要问题是本地安装的ruby​​版本v2.7.2。有必要使用v2.7.3或更高版本

相关问题