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

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

此问题已在此处找到答案

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

命令:

bundler exec pod install

堆栈:

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

错误

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:
    /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: mach-o, but wrong architecture - /Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle
/Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ffi-1.15.0/lib/ffi.rb:6:in `require’
/Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ffi-1.15.0/lib/ffi.rb:6:in `rescue in <top (required)>’
/Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ffi-1.15.0/lib/ffi.rb:3:in `<top (required)>’
/Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ethon-0.13.0/lib/ethon.rb:3:in `require’
/Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/ethon-0.13.0/lib/ethon.rb:3:in `<top (required)>’
/Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `require’
/Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>’
/Users/myName/Documents/projectName/bundler/ruby/2.6.0/gems/cocoapods-core-1.10.1/lib/cocoapods-core/cdn_source.rb:440:in `require’
/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’
...
/Library/Ruby/Gems/2.6.0/gems/bundler-2.2.7/exe/bundle:37:in `<top (required)>’
/usr/local/bin/bundle:23:in `load’
/usr/local/bin/bundle:23:in `<main>’
nwwlzxa7

nwwlzxa71#

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

相关问题