Skip to content

Cocoapod path broken by upgrading macOS #36786

@christopherfujino

Description

@christopherfujino

Update: looking from this Cocoapods issue, it seems like this will happen any time your system ruby changes (rvm can also break this). I don't think there's a real fix for this, other than directing users to re-install cocoapods (with their new system ruby).

NOTE: The flutter tool should also catch and gracefully exit on this.


When upgrading to the macOS Catalina beta and installing the beta version of Xcode 11, my cocoapods install was broken, with the following error message:

flutter@macN1 / % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel master, v1.8.2-pre.133, on Mac OS X 10.15 19A512f, locale en-US)
    ✗ Downloaded executables cannot execute on host.
      See https://github.com/flutter/flutter/issues/6207 for more information
 
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
      You may also want to add it to your PATH environment variable.
 
[!] Xcode - develop for iOS and macOS (Xcode 11.0)
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install:
        sudo gem install cocoapods
        pod setup
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[!] VS Code (version 1.36.1)
    ✗ Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
[✓] Connected device (2 available)
 
! Doctor found issues in 5 categories.
flutter@macN1 / % pod setup
/usr/local/bin/pod: /usr/local/Cellar/cocoapods/1.7.4/libexec/bin/pod: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: bad interpreter: No such file or directory
/usr/local/bin/pod: line 2: /usr/local/Cellar/cocoapods/1.7.4/libexec/bin/pod: Undefined error: 0
flutter@macN1 / % ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]

It looks like it is this issue. I fixed it by sudo gem install -n /usr/local/bin cocoapods.

I would guess this is not directly related to using Catalina, but rather having a non-standard beta Xcode installation.

Metadata

Metadata

Labels

toolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions