Tuesday, October 4, 2022

[SOLVED] CMake Error at /snap/flutter/126/usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:419 Flutter Linux

Issue

I am trying to use the FirebaseCoreDesktop and rel="nofollow noreferrer">FirebaseAuthDesktop packages in my Flutter Project for linux (ubuntu). Unfortunatly when trying to run the App, I am getting the following Error.

CMake Error at /snap/flutter/126/usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:419 (message):
  A required package was not found
Call Stack (most recent call first):
  /snap/flutter/126/usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:597 (_pkg_check_modules_internal)
  flutter/ephemeral/.plugin_symlinks/desktop_webview_auth/linux/CMakeLists.txt:21 (pkg_check_modules)

Thanks for your help in advance.


Solution

Found the solution.

Run

sudo apt install libwebkit2gtk-4.0-dev -y

and I had to uninstall flutter(snap) and install the Flutter git version in directory of your choice.

git clone https://github.com/flutter/flutter.git

As said in DesktopWebviewAuth. And then change flutter SDK path to the one you cloned and remove the build folder from my project.



Answered By - Iniyan Kanmani
Answer Checked By - Senaida (WPSolving Volunteer)