Mac M1 - Cocoapods 不工作 (Flutter) verify_minimum_git_version

时间:2021-06-20 17:33:12

标签: ruby flutter github cocoapods apple-m1

我正在尝试让 Cocoapods 在我的 Mac Book Pro M1 上运行,目前正在尝试以下解决方案:

来源: https://stackoverflow.com/a/65334677/16114837

但是在第二步我得到这个错误:

arch -x86_64 pod install
Traceback (most recent call last):
        5: from /usr/local/bin/pod:23:in `<main>'
        4: from /usr/local/bin/pod:23:in `load'
        3: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/bin/pod:55:in `<top (required)>'
        2: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:49:in `run'
        1: from /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:140:in `verify_minimum_git_version!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.1/lib/cocoapods/command.rb:128:in `git_version': Failed to extract git version from `git --version` ("") (RuntimeError)

这里有一些背景信息:

ruby -v
ruby 3.0.1p64 (2021-04-05 revision 0fb782ee38) [arm64-darwin20]
 which ruby
/opt/homebrew/opt/ruby/bin/ruby
git --version
git version 2.30.1 (Apple Git-130)

flutter doctor -v
[✓] Flutter (Channel stable, 2.2.1, on macOS 11.4 20F71 darwin-arm, locale en-ES)
    • Flutter version 2.2.1 at /Users/timknogel/tools/flutter
    • Framework revision 02c026b03c (3 weeks ago), 2021-05-27 12:24:44 -0700
    • Engine revision 0fdb562ac8
    • Dart version 2.13.1

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    • Android SDK at /Users/timknogel/Library/Android/sdk
    • Platform android-30, build-tools 30.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5, Build version 12E262
    • CocoaPods version 1.10.1

[✗] Chrome - develop for the web (Cannot find Chrome executable at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 4.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      ? https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      ? https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6916264)

[✓] Connected device (1 available)
    • Tim’s iPhone (mobile) • 00008030-000620C83CDB802E • ios • iOS 14.6
    ! Error: Tim’s iPhone is busy: Copying cache files from device. Xcode will continue when Tim’s iPhone is finished. (code -10)

0 个答案:

没有答案