A required package was not found Call Stack (most recent call first): /snap/flutter/101/usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:597 (_pkg_check_modules_internal) flutter/ephemeral/.plugin_symlinks/flutter_secure_storage/linux/CMakeLists.txt:14 (pkg_check_modules)
-
3You probably need to add to the question post more information about what you are doing when you got given error. – Tsyvarev Aug 23 '21 at 11:33
-
1on debug console shows only this – user8819119 Aug 23 '21 at 13:17
5 Answers
In the doc of the package you can see it needs libsecret.
You just need to install the following packages:
sudo apt install libsecret-1-dev libsecret-tools libsecret-1-0
That worked for me :)

- 96
- 1
-
It didn't work for me. `libsecret-1-0 is already the newest version (0.20.4-0ubuntu1).` – markhorrocks Mar 04 '22 at 01:14
-
Also `libjsoncpp1` is not needed since `hirsute (21.04)`, but `libjsoncpp-dev` is required. Also my build failed with `unsupported GNU_PROPERTY_TYPE (5) type: 0xc0008002`. Needed to install flutter manually, see [here](https://stackoverflow.com/questions/66614590/flutter-for-linux-build-fail) and [flutter doc](https://docs.flutter.dev/get-started/install/linux#install-flutter-manually) – User Rebo Apr 12 '22 at 11:15
If you, like me, already have libsecret-1-dev, libjsoncpp-dev and libsecret-1-0 installed, look in the message for the line of CMakeList.txt which error occurs:
Call Stack (most recent call first): ...
flutter/ephemeral/.plugin_symlinks/flutter_secure_storage_linux/linux/CMakeLists.txt:14 (pkg_check_modules)Line 14, in case: pkg_check_modules(JSONCPP REQUIRED IMPORTED_TARGET jsoncpp)
So, all you need is install the package missing. Im my case (Ubuntu 18.04) the package is libjsoncpp-dev:
$ sudo apt install libjsoncpp-dev

- 99
- 5
On my side, I removed the firebase_ui_auth: ^1.1.6 package from my project and it was able to run. I think there might be a bug in the package. Run:
$ flutter pub remove firebase_ui_auth

- 41
- 6
I encounter the same issue on Fedora.
The solution for me was to run this command: "sudo dnf install libsecret-devel jsoncpp-devel
".

- 13
- 2