首页 > 解决方案 > 颤振升级后mac上的cocoapods错误

问题描述

我尝试在我的 mac 上进行 2.2.3 flutter 升级,但现在由于这个错误我无法运行

我试过brew link --overwrite cocoapods 了,但没有检测到命令

zsh: command not found: brew

我也害怕升级 cocoapods,因为我测试了颤振 null 安全迁移,但如果我不成功,我会回到以前的工作版本(颤振和 cocoapods)。

这是我的错误:

Warning: CocoaPods recommended version 1.10.0 or greater not installed.
Pods handling may fail on some projects involving plugins.
To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

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

    Analyzing dependencies

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

    Finding Podfile changes
      R capture_and_share
      R screenshot_share_image
      - Flutter
      - app_review
      - audioplayers
      - cloud_firestore
      - firebase_core
      - flutter_email_sender
      - image_picker
      - package_info
      - path_provider
      - purchases_flutter
      - sensors
      - share_plus
      - shared_preferences
      - unique_identifier
      - url_launcher
      - vibration
      - webview_flutter

    Fetching external sources
    -> Fetching podspec for `Flutter` from `Flutter`
    -> Fetching podspec for `app_review` from `.symlinks/plugins/app_review/ios`
    -> Fetching podspec for `audioplayers` from `.symlinks/plugins/audioplayers/ios`
    -> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
    cloud_firestore: Using Firebase SDK version '8.3.0' defined in 'firebase_core'
    -> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
    firebase_core: Using Firebase SDK version '8.3.0' defined in 'firebase_core'
    -> Fetching podspec for `flutter_email_sender` from `.symlinks/plugins/flutter_email_sender/ios`
    -> Fetching podspec for `image_picker` from `.symlinks/plugins/image_picker/ios`
    -> Fetching podspec for `package_info` from `.symlinks/plugins/package_info/ios`
    -> Fetching podspec for `path_provider` from `.symlinks/plugins/path_provider/ios`
    -> Fetching podspec for `purchases_flutter` from `.symlinks/plugins/purchases_flutter/ios`
    -> Fetching podspec for `sensors` from `.symlinks/plugins/sensors/ios`
    -> Fetching podspec for `share_plus` from `.symlinks/plugins/share_plus/ios`
    -> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`
    -> Fetching podspec for `unique_identifier` from `.symlinks/plugins/unique_identifier/ios`
    -> Fetching podspec for `url_launcher` from `.symlinks/plugins/url_launcher/ios`
    -> Fetching podspec for `vibration` from `.symlinks/plugins/vibration/ios`
    -> Fetching podspec for `webview_flutter` from `.symlinks/plugins/webview_flutter/ios`

    Resolving dependencies of `Podfile`
      CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/7.7.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_9_a_d.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/9/a/d/PurchasesHybridCommon/1.5.1/PurchasesHybridCommon.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/7.3.0/Firebase.podspec.json exists! Returning local because checking is only perfomed in repo update
    [!] CocoaPods could not find compatible versions for pod "Firebase/Firestore":
      In snapshot (Podfile.lock):
        Firebase/Firestore (= 7.3.0)

      In Podfile:
        cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 2.4.0, which depends on
          Firebase/Firestore (= 8.3.0)

    Specs satisfying the `Firebase/Firestore (= 7.3.0), Firebase/Firestore (= 8.3.0)` dependency were found, but they required a higher minimum deployment target.

    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:328:in `raise_error_unless_state'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:310:in `block in unwind_for_conflict'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `tap'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:308:in `unwind_for_conflict'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:257:in `process_topmost_state'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:182:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/resolver.rb:94:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1065:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:1063:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:410:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:235:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:234:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/installer.rb:156:in `install!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/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.9.3/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'

Error output from CocoaPods:
↳
    /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin20/rbconfig.rb:229: warning: Insecure world writable dir /Users/quentinguichot/Developer/flutter/bin in PATH, mode 040777
    Ignoring ffi-1.13.1 because its extensions are not built. Try: gem pristine ffi --version 1.13.1

Exception: Error running pod install

标签: flutter

解决方案


推荐阅读