Flutter on Linux: desktop apps
Egor Dolgov · 09.11.2026For Linux desktop apps, Flutter needs a compiler, build tools and the GTK library.
To build Linux desktop programs with Flutter, you need a C++ compiler, build tools and the GTK library. You don't need them to run in a browser or on Android — only for Linux programs.
Contents:
- Build packages
- Checking: flutter doctor
- Running and building
- What the user's computer needs
- Summary
1. Build packages
Flutter needs the
clang
,
cmake
,
ninja-build
,
pkg-config
,
libgtk-3-dev
and
libstdc++-12-dev
packages. On Ubuntu and Debian they install with one command. Commands are typed in Terminal — how to open it and paste a command is on the
Installing Git
page:
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libstdc++-12-dev
sudo
asks for your account password; the characters don't show as you type. The
libstdc++-12-dev
package exists in Ubuntu 22.04 and later and in Debian 12 and later; Ubuntu 20.04 and Debian 11 don't have it, and the command stops with “Unable to locate package”.
On other distros, install the same packages with your package manager — the Flutter documentation has no ready commands for them.
2. Checking: flutter doctor
flutter doctor
The
Linux toolchain - develop for Linux desktop
section should have a checkmark. If something is missing, doctor names the package, for example:
clang++ is required for Linux development.
It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from https://releases.llvm.org/
It reports CMake, ninja, pkg-config and the GTK libraries the same way. Without
pkg-config
, doctor can't check GTK: if it only mentions pkg-config, run
flutter doctor
again after installing it.
The hint “Unable to access driver information using 'eglinfo'” is not an error: doctor couldn't read the graphics driver information. The
mesa-utils
package removes it:
sudo apt-get install mesa-utils
Another check is
flutter devices
: the list should include a line with the
linux
platform.
3. Running and building
Run the project as a Linux program — in the project folder (we create the first project in Lesson 1):
flutter run -d linux
Build the finished program:
flutter build linux
The program appears in your project's
build/linux/x64/release/bundle/
folder (on an Arm64 computer —
build/linux/arm64/release/bundle/
): next to the executable are a
lib
folder with the
.so
libraries it needs and a
data
folder with the app's data. Move the program as the whole
bundle
folder.
4. What the user's computer needs
For the built program to run on someone else's computer, that computer needs the system libraries it uses. According to the Flutter documentation, this command may be enough:
sudo apt-get install libgtk-3-0 libblkid1 liblzma5
5. Summary
-
Linux programs need
clang,cmake,ninja-build,pkg-config,libgtk-3-dev,libstdc++-12-dev. -
Check with
flutter doctor(the Linux toolchain section) andflutter devices(thelinuxline). -
flutter run -d linuxruns,flutter build linuxbuilds the program intobuild/linux/x64/release/bundle/.
Installing Flutter itself is in Lesson 0 . Running on Android — Setting up Android for Flutter . We create the first project in Lesson 1 .