Flutter A required package was not found flutter_secure_storage/linux/CMakeLists.txt:14

Viewed 1847

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)

3 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 :)

sudo apt-get install libsecret-1-dev libjsoncpp-dev libsecret-1-0

Worked for me

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
Related