google / flutter-desktop-embedding

Experimental plugins for Flutter for Desktop
Apache License 2.0
7.1k stars 604 forks source link

Flutter launch error #874

Closed abhilashraju closed 3 years ago

abhilashraju commented 3 years ago

I was following steps here https://flutter.dev/docs/get-started/install/linux#update-your-path When I launch the flutter demo, I am getting the following error. My clang and cmake are latest versions

Launching lib/main.dart on Linux in debug mode...
lib/main.dart:1
/net/nfs-bang-svr.psr.rd.hpicorp.net/sirius/tools3/bin/cmake-chooser: line 9: /sirius/tools3/cmake-3.10/bin/cmake-chooser: No such file or directory
Exception: Unable to generate build files
Exited (sigterm)

cmake installed

sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
pkg-config is already the newest version (0.29.1-0ubuntu1).
ninja-build is already the newest version (1.5.1-0.1ubuntu1).
cmake is already the newest version (3.5.1-1ubuntu3).
libgtk-3-dev is already the newest version (3.18.9-1ubuntu3.3).
clang is already the newest version (1:3.8-33ubuntu3.1).
0 upgraded, 0 newly installed, 0 to remove and 109 not upgraded.

Doctor Output Please provide the output of flutter doctor -v:

[✓] Flutter (Channel master, 2.5.0-2.0.pre.113, on Ubuntu 16.04.7 LTS 4.4.0-210-generic, locale en_US.UTF-8)
    • Flutter version 2.5.0-2.0.pre.113 at /sirius/work/rabhil/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 0abf02f855 (2 days ago), 2021-07-30 17:44:02 -0700
    • Engine revision 29f9df723f
    • Dart version 2.14.0 (build 2.14.0-368.0.dev)

[✗] 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/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Chrome - develop for the web
    • Chrome at google-chrome

[✗] Linux toolchain - develop for Linux desktop
    • clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
    ✗ CMake is required for Linux development.
      It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
    • ninja version 1.6.0
    ✗ ninja 1.8.0 or later is required.
    • pkg-config version 0.29.1

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] VS Code (version 1.58.2)
    • VS Code at /usr/share/code
    • Flutter extension version 3.14.1

[✓] Connected device (2 available)
    • Linux (desktop) • linux  • linux-x64      • Ubuntu 16.04.7 LTS 4.4.0-210-generic
    • Chrome (web)    • chrome • web-javascript • Google Chrome 84.0.4147.125

! Doctor found issues in 3 categories.
alexmercerind commented 3 years ago
[✗] Linux toolchain - develop for Linux desktop
    • clang version 3.8.0-2ubuntu4 (tags/RELEASE_380/final)
    ✗ CMake is required for Linux development.
      It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
    • ninja version 1.6.0
    ✗ ninja 1.8.0 or later is required.
    • pkg-config version 0.29.1

Does this seem right to you?

abhilashraju commented 3 years ago

Nope . that is why i am confused. I have the latest CMake installed. But still flutter doctor reported the above issue. wanted to know what might have gone wrong. see the output of apt install cmake below

Reading package lists... Done
Building dependency tree       
Reading state information... Done
cmake is already the newest version (3.5.1-1ubuntu3).
0 upgraded, 0 newly installed, 0 to remove and 109 not upgraded.
alexmercerind commented 3 years ago

@abhilashraju did you install Flutter using snap?

Regardless, I wanna say:

abhilashraju commented 3 years ago

I am not using snap I cloned the repo.

alexmercerind commented 3 years ago

I am not using snap I cloned the repo.

Doesn't seem like it. Possibly you are still invoking old snap version. Confirm with whereis flutter.

stuartmorgan commented 3 years ago

https://github.com/google/flutter-desktop-embedding#feedback

stuartmorgan commented 3 years ago

I am not using snap I cloned the repo.

Doesn't seem like it.

@alexmercerind It does not appear that you know what a snap installation looks like in doctor; it is not helpful to argue with people about how they installed if you don't know how to tell from the provided output (doubly so when you already know that it is off topic here.)