ruby iOS构建失败,“运行pod安装时出错”,pod安装/ pod安装--repo-update未解决该问题

qlfbtfca  于 2022-11-04  发布在  Ruby
关注(0)|答案(2)|浏览(122)

flutter build ios --release之后,它在pod安装中卡住,导致运行pod安装时出错

Running pod install...                                             954ms
CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

    Finding Podfile changes
      - Flutter
      - app_settings
      - biometric_storage
      - blinkid_flutter
      - camera
      - contacts_service
      - device_info_plus
      - firebase_core
      - firebase_messaging
      - flutter_biometrics
      - flutter_inappwebview
      - flutter_local_notifications
      - flutter_native_timezone
      - flutter_secure_storage
      - flutter_zendesk_chat
      - geocoding
      - geolocator_apple
      - google_ml_kit
      - image_gallery_saver
      - in_app_review
      - multi_image_picker2
      - package_info_plus
      - path_provider_ios
      - phone_number
      - printing
      - scan
      - share
      - sqflite
      - uni_links
      - url_launcher_ios
      - video_player
      - wakelock
      - webview_flutter_wkwebview

    Fetching external sources
    -> Fetching podspec for `Flutter` from `Flutter`

Error output from CocoaPods:
↳
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `force_encoding': can't modify frozen String
    (FrozenError)
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `report'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:66:in `report_error'
        from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:396:in `handle_exception'
        from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:337:in `rescue in run'
        from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:324:in `run'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
        from /usr/local/bin/pod:23:in `load'
        from /usr/local/bin/pod:23:in `<main>'
    /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/base.rb:245:in `rescue in load_yml': can not load translations from
    /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.3.2/lib/active_support/locale/en.yml: #<Psych::DisallowedClass: Tried to load unspecified class:
    Symbol> (I18n::InvalidLocaleData)
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/base.rb:241:in `load_yml'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/base.rb:226:in `load_file'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/base.rb:18:in `block in load_translations'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/base.rb:18:in `each'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/base.rb:18:in `load_translations'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/simple.rb:80:in `init_translations'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/simple.rb:90:in `lookup'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/base.rb:32:in `translate'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n.rb:207:in `block in translate'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n.rb:203:in `catch'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n.rb:203:in `translate'
        from /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.3.2/lib/active_support/core_ext/array/conversions.rb:70:in `to_sentence'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/validator.rb:197:in `failure_reason'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/external_sources/abstract_external_source.rb:194:in `validate_podspec'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/external_sources/abstract_external_source.rb:178:in `store_podspec'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/external_sources/path_source.rb:17:in `block in fetch'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/external_sources/path_source.rb:11:in `fetch'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:993:in `fetch_external_source'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:972:in `block (2 levels) in fetch_external_sources'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:971:in `each'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:971:in `block in fetch_external_sources'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:970:in `fetch_external_sources'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:117:in `analyze'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in `analyze'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
        from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
        from /usr/local/bin/pod:23:in `load'
        from /usr/local/bin/pod:23:in `<main>'
    /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/class_loader.rb:99:in `find': Tried to load unspecified class: Symbol
    (Psych::DisallowedClass)
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/class_loader.rb:28:in `load'
        from (eval):2:in `symbol'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/class_loader.rb:32:in `symbolize'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/class_loader.rb:84:in `symbolize'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:120:in `deserialize'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:128:in `visit_Psych_Nodes_Scalar'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/visitor.rb:30:in `visit'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/visitor.rb:6:in `accept'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:35:in `accept'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:343:in `each'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:343:in `each_slice'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:343:in `revive_hash'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/visitor.rb:30:in `visit'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/visitor.rb:6:in `accept'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:35:in `accept'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:343:in `each'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:343:in `each_slice'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:343:in `revive_hash'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/visitor.rb:30:in `visit'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/visitor.rb:6:in `accept'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:35:in `accept'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:343:in `each'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:343:in `each_slice'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:343:in `revive_hash'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/visitor.rb:30:in `visit'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/visitor.rb:6:in `accept'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:35:in `accept'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:345:in `block in revive_hash'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:343:in `each'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:343:in `each_slice'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:343:in `revive_hash'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:167:in `visit_Psych_Nodes_Mapping'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/visitor.rb:30:in `visit'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/visitor.rb:6:in `accept'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:35:in `accept'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:318:in `visit_Psych_Nodes_Document'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/visitor.rb:30:in `visit'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/visitor.rb:6:in `accept'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych/visitors/to_ruby.rb:35:in `accept'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych.rb:334:in `safe_load'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych.rb:587:in `block in safe_load_file'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych.rb:586:in `open'
        from /Users/gustavogikis/.gem/ruby/2.6.0/gems/psych-4.0.0/lib/psych.rb:586:in `safe_load_file'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/base.rb:243:in `load_yml'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/base.rb:226:in `load_file'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/base.rb:18:in `block in load_translations'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/base.rb:18:in `each'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/base.rb:18:in `load_translations'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/simple.rb:80:in `init_translations'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/simple.rb:90:in `lookup'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n/backend/base.rb:32:in `translate'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n.rb:207:in `block in translate'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n.rb:203:in `catch'
        from /Library/Ruby/Gems/2.6.0/gems/i18n-1.8.10/lib/i18n.rb:203:in `translate'
        from /Library/Ruby/Gems/2.6.0/gems/activesupport-6.1.3.2/lib/active_support/core_ext/array/conversions.rb:70:in `to_sentence'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/validator.rb:197:in `failure_reason'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/external_sources/abstract_external_source.rb:194:in `validate_podspec'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/external_sources/abstract_external_source.rb:178:in `store_podspec'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/external_sources/path_source.rb:17:in `block in fetch'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/external_sources/path_source.rb:11:in `fetch'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:993:in `fetch_external_source'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:972:in `block (2 levels) in fetch_external_sources'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:971:in `each'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:971:in `block in fetch_external_sources'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:970:in `fetch_external_sources'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/analyzer.rb:117:in `analyze'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:416:in `analyze'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in `section'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:161:in `install!'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command/install.rb:52:in `run'
        from /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in `run'
        from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/bin/pod:55:in `<top (required)>'
        from /usr/local/bin/pod:23:in `load'
        from /usr/local/bin/pod:23:in `<main>'

在这之后,我转到ios子文件夹,希望pod install或pod install --repo-update能帮助我解决这个问题,但是对于这两个示例中的任何一个,我都会在该行之后继续得到所有这些错误行

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface/error_report.rb:34:in `force_encoding': can't modify frozen String
(FrozenError)

所有这些错误都是在我不得不升级到蒙特雷之后开始的,为了拥有带有xCode的SDK 13. 0及以上版本。
第一个

安装源

Executable Path: /usr/local/bin/pod

插件

cocoapods-deintegrate : 1.0.4
cocoapods-keys        : 2.2.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

我是相当新的Mac iOS和从来没有处理过这类错误之前。我已经阅读了这几天的一些线程关于pod安装错误,宝石和ruby的问题,(因为部分错误是指那个),cocoapods错误。我不知道这是ruby问题,cocoapods安装问题,甚至是路径问题(或者别的什么),因为我已经尝试了一点点的一切都无济于事。
也试过扑动--医生,但一切正常。
只是一个小注意,在这次升级之前,我确实做了几个构建,甚至上传到苹果商店没有问题。
提前感谢您的指导,

a7qyws3x

a7qyws3x1#

它对我起作用了,在终端执行此代码。

sudo gem update xcodeproj
g6ll5ycj

g6ll5ycj2#

我升级到新版本时也遇到了与您相同的错误,这是由您的ios文件夹导致的错误
我通过以下方法修复了它:

移除项目中的ios文件夹

  • 光盘输入输出系统
  • 射频输入输出系统
    复制旧的ios文件夹或生成新的ios文件夹
  • 生成:抖动创建-i swift
    现在,您可以在ios文件夹中运行pod安装程序
  • pod设置
  • pod安装程序

祝你好运!

相关问题