user8819119
user8819119

Reputation: 366

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

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)

Upvotes: 11

Views: 12480

Answers (6)

I run this command on my Ubuntu 22.04 and it worked for me :

sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev libstdc++-12-dev clang cmake ninja-build pkg-config libgtk-3-dev libboost-all-dev libsecret-1-dev libjsoncpp-dev libsecret-1-0

Upvotes: 0

Furkan Bora
Furkan Bora

Reputation: 43

I encounter the same issue on Fedora.

The solution for me was to run this command: "sudo dnf install libsecret-devel jsoncpp-devel".

Upvotes: 3

Samuel Wakoli
Samuel Wakoli

Reputation: 300

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

Upvotes: 0

Warlei Alves
Warlei Alves

Reputation: 109

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

Upvotes: 3

Kule
Kule

Reputation: 111

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

Worked for me

Upvotes: 10

A.Wy
A.Wy

Reputation: 206

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

Upvotes: 19

Related Questions