安装 pod 'CLTypingLabel' 时出错。我不知道如何解决它。我已经尝试了很多次。请有人帮助我

Posted

技术标签:

【中文标题】安装 pod \'CLTypingLabel\' 时出错。我不知道如何解决它。我已经尝试了很多次。请有人帮助我【英文标题】:An error occured while installing pod 'CLTypingLabel'. I don't know how to fix it. I have tried many time. Please someone help me安装 pod 'CLTypingLabel' 时出错。我不知道如何解决它。我已经尝试了很多次。请有人帮助我 【发布时间】:2021-06-05 08:07:23 【问题描述】:

―――MARKDOWN模板―――――――――――――――――――――――――――――――――――――――― ――――――――――――――――――

命令

/usr/local/bin/pod install

报告

你做了什么?

你预计会发生什么?

发生了什么?

堆栈

   CocoaPods : 1.10.1
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.arm64e-darwin20]
    RubyGems : 3.0.3
        Host : macOS 11.2.1 (20D74)
       Xcode : 12.4 (12D4e)
         Git : git version 2.24.3 (Apple Git-128)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : 

插件

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

播客文件

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

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

  # Pods for Flash Chat iOS13
  pod 'CLTypingLabel'

end

错误

LoadError - dlopen(/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle, 0x0009): missing compatible arch in /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi_c.bundle - /Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/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'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi.rb:6:in `rescue in <top (required)>'
/Library/Ruby/Gems/2.6.0/gems/ffi-1.15.0/lib/ffi.rb:3:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/ethon-0.12.0/lib/ethon.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/typhoeus-1.4.0/lib/typhoeus.rb:2:in `<top (required)>'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:74:in `cdn_url?'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:36:in `create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/sources_manager.rb:21:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:178:in `block in sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:177:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:177:in `sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1073:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:414:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:238:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/installer.rb:160:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

―――模板结束―――――――――――――――――――――――――――――――――――――――― ――――――――――――――――――――――

[!] 哦不,发生了错误。

搜索与您类似的现有 GitHub 问题: https://github.com/CocoaPods/CocoaPods/search?q=dlopen%28%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.0%2Flib%2Fffi_c.bundle%2C+0x0009%29%3A+missing+compatible+arch+in+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.0%2Flib%2Fffi_c.bundle+-+%2FLibrary%2FRuby%2FGems%2F2.6.0%2Fgems%2Fffi-1.15.0%2Flib%2Fffi_c.bundle&type=Issues

如果不存在,请使用上面显示的模板在以下位置创建一个工单: https://github.com/CocoaPods/CocoaPods/issues/new

请务必先阅读贡献指南,详细了解如何正确提交工单: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

不要忘记匿名化任何私人数据!

正在寻找关于 cocoapods/cocoapods 的相关问题... 没有发现类似问题。要创建新问题,请访问: https://github.com/cocoapods/cocoapods/issues/new arunodhaiv@Arunodhais-MacBook-Air Flash-Chat-iOS13 %

【问题讨论】:

尝试关注这个 - ***.com/questions/64901180/… 【参考方案1】:

我遇到了同样的问题。这可能与我的 M1 MacBook 有关。所以我使用了这个解决方案,问题就解决了。

Running Cocoapods on Apple Silicon (M1)

先安装这个,

sudo gem 安装 ffi

然后重复 pod init 并安装。

【讨论】:

try this,它对我有用。 sudo arch -x86_64 gem install ffiarch -x86_64 pod install 我想我最终用 brew 安装了它。我不太记得了,但我确实让它工作了。感谢您的跟进。【参考方案2】:

我以前的 MacBook M1 有同样的问题,它有一个 ARM 处理器,所以我们必须在 XCode 中指定。

选择项目>选择目标>构建设置>排除架构>在列表中添加arm64

【讨论】:

以上是关于安装 pod 'CLTypingLabel' 时出错。我不知道如何解决它。我已经尝试了很多次。请有人帮助我的主要内容,如果未能解决你的问题,请参考以下文章

安装 pod Alamofire 时出现错误

pod 安装时出现 Flutter 错误:CocoaPods 找不到 pod“Firebase/CoreOnly”的兼容版本

安装 Alamofire pod 时出现名称冲突错误

在 AWS EKS 上扩展 pod 时出现 502 ALB 错误

在 Swift Playground 中导入 pod 时出现“没有这样的模块”

pod 更新后编译时出现错误“'sharedApplication' 不可用:在 iOS (App Extension) 上不可用....”