How To Install Flutter on Debian 13

Install Flutter on Debian 13

If you want to build cross-platform apps for Android, Linux desktop, and the web from a single codebase, Flutter is one of the best tools available today. Getting a working Flutter environment on a fresh Debian 13 (Trixie) system involves more than just unpacking a tarball. You need the right dependencies, a properly structured Android SDK, correct environment variables, and a verified toolchain before you write a single line of Dart.

This guide walks you through how to install Flutter on Debian 13 from scratch, with every command explained, real terminal output included, and a troubleshooting section for the most common errors developers run into. Whether you are a sysadmin setting up a development workstation or a developer jumping into Flutter for the first time on Linux, this guide gives you exactly what you need.

By the end of this tutorial, you will have Flutter running on Debian 13 Trixie, Android SDK configured without requiring Android Studio, and a test app running both as a Linux desktop application and in the browser.

What Is Flutter and Why Use It on Debian 13?

Flutter is Google’s open-source UI toolkit for building natively compiled applications for mobile, web, desktop, and embedded systems from a single codebase. It uses the Dart programming language and renders its own widgets through the Impeller or Skia rendering engine, which makes it independent of platform-specific UI components.

As of 2025, the latest stable release is Flutter 3.35.5 with Dart 3.9.2 and DevTools 2.48.0. These version numbers matter because they align with the toolchain packages available natively on Debian 13 Trixie.

Debian 13 (Trixie) makes a strong development platform for Flutter for several practical reasons:

  • It ships with clang 19.1.7 and cmake 3.31.6 natively, both required by Flutter’s Linux compilation toolchain.
  • It runs a modern Linux kernel 6.12.x series with better OpenGL support for Flutter’s rendering pipeline.
  • The apt package manager makes dependency installation clean and reproducible across machines.
  • Flutter’s flutter doctor output explicitly recognizes Debian GNU/Linux 13 (trixie) as a supported platform.

Prerequisites and System Requirements

Before you run a single command, confirm your environment meets these requirements:

  • Operating system: Debian GNU/Linux 13 (Trixie), 64-bit amd64 architecture
  • Disk space: At least 600 MB for Flutter SDK alone; plan for 4 GB or more when adding the Android SDK and Gradle cache
  • RAM: 4 GB minimum; 8 GB recommended if you plan to run Android emulators
  • Internet access: Required to download the Flutter tarball (approximately 600 MB) and Android SDK packages
  • Sudo privileges: Required for installing system packages via apt
  • A terminal emulator: GNOME Terminal, xterm, Alacritty, or any terminal you prefer
  • Git: Will be installed as part of the dependency step

You do not need Android Studio. This guide uses the Android SDK Command-Line Tools, which are lightweight and fully supported by Flutter.

Step 1: Update Your Debian 13 System

Always start with a full system update. This ensures your compiler toolchain packages (gcc, glibc, kernel headers) are at their latest versions before Flutter links against them.

sudo apt update && sudo apt upgrade -y

If the update includes a kernel upgrade, reboot the system before continuing:

sudo reboot

A stale system is one of the most common silent failure points in Flutter Linux builds. Updating first eliminates an entire category of hard-to-diagnose errors.

Step 2: Install Required System Dependencies

Flutter on Linux needs two groups of packages. The first group covers core file utilities and OpenGL support. The second group provides the native Linux compilation toolchain Flutter uses to build desktop applications.

Install Core Utilities

sudo apt install curl git unzip xz-utils zip libglu1-mesa
  • curl and wget handle file downloads
  • git is required for Flutter’s internal update mechanism
  • unzip, xz-utils, and zip handle archive extraction
  • libglu1-mesa provides OpenGL utility support for Flutter’s renderer

Install the Linux Build Toolchain

sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev
  • clang is the C++ compiler Flutter uses on Linux (not GCC)
  • cmake and ninja-build drive the native build system
  • pkg-config locates system libraries at compile time
  • libgtk-3-dev provides the GTK window system headers Flutter’s Linux shell uses
  • libstdc++-12-dev ensures C++ standard library headers are available for linking

Optional: Install Mesa Utilities

If you run a lightweight window manager such as i3, Sway, or Openbox, install mesa-utils to confirm OpenGL is working correctly:

sudo apt install mesa-utils
glxinfo -B

You should see output showing direct rendering: Yes and your GPU vendor. If direct rendering is disabled, Flutter’s Linux desktop target will fail to render.

Step 3: Download the Flutter SDK

The manual tarball method gives you full control over which Flutter version you run and where it lives on disk. This is the recommended approach for development workstations.

First, check the current stable version at docs.flutter.dev/install. At the time of writing, the current stable version is 3.35.5.

Store the version in an environment variable so the download command stays clean and reusable:

export LATEST_FLUTTER_VERSION=3.35.5-stable
wget "https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${LATEST_FLUTTER_VERSION}.tar.xz"

Using a variable means upgrading Flutter in the future only requires changing one value, not hunting through a long command.

Step 4: Extract the SDK and Configure Your PATH

Extract the tarball and move the Flutter directory to a permanent location in your home directory:

tar -xvf "flutter_linux_${LATEST_FLUTTER_VERSION}.tar.xz"
mv flutter ~/.flutter-sdk

Now add the Flutter binary to your PATH so you can call the flutter command from anywhere in the terminal:

echo 'export PATH=$HOME/.flutter-sdk/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

The source ~/.bashrc command applies the change immediately without requiring you to close and reopen the terminal. If you use Zsh, add the same line to ~/.zshrc instead.

Clean up the downloaded archive to recover disk space:

rm "flutter_linux_${LATEST_FLUTTER_VERSION}.tar.xz"

Verify the installation:

flutter --version

Expected output:

Flutter 3.35.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ac4e799d23
Engine • revision d3d45dcf25
Tools • Dart 3.9.2 • DevTools 2.48.0

Step 5 (Alternative): Install Flutter via Snap

If you want the fastest possible setup and do not need fine-grained version control, Snap is a valid alternative. The Flutter snap package is maintained by the official Flutter team.

First, install and enable snapd on Debian 13:

sudo apt update
sudo apt install snapd
sudo snap install snapd

Then install Flutter:

sudo snap install flutter --classic

The --classic flag is required because Flutter needs unrestricted filesystem access to locate SDK tools, manage caches, and run build processes. Snap’s default confinement model blocks this access.

When to choose Snap vs. manual:

  • Use Snap for quick personal setups or when you want automatic updates.
  • Use the manual tar.xz method for production development environments where you control the Flutter version and upgrade timing.

Step 6: Run flutter doctor to Verify the Flutter Install on Debian 13

Before going further, run flutter doctor in verbose mode to get a detailed status of every component Flutter needs:

flutter doctor -v

At this stage, you expect to see two green checkmarks and Android still showing as incomplete. This is normal.

Expected output:

[✓] Flutter (Channel stable, 3.35.5, on Debian GNU/Linux 13 (trixie) 6.12.48+deb13-amd64)
    • Flutter version 3.35.5
    • Dart version 3.9.2
    • DevTools version 2.48.0

[✓] Linux toolchain - develop for Linux desktop
    • Debian clang version 19.1.7 (3+b1)
    • cmake version 3.31.6
    • ninja version 1.13.0
    • pkg-config version 1.8.1

[✗] Android toolchain - develop for Android devices
    • Android SDK not found. Covered in next steps.

Save or screenshot this output. It serves as your baseline when troubleshooting later.

Step 7: Install Java (OpenJDK 17) for Android Support

The Android SDK tooling and Flutter’s Gradle-based build system both require a Java Development Kit. OpenJDK 17 is the confirmed stable version for Flutter’s current Android toolchain on Debian 13.

sudo apt install openjdk-17-jdk openjdk-17-jre

Verify the installation:

java -version

Expected output:

OpenJDK Runtime Environment (build 17.0.17-ea+8-Debian-1)
OpenJDK 64-Bit Server VM (build 17.0.17-ea+8-Debian-1, mixed mode, sharing)

OpenJDK 21 may also work, but OpenJDK 17 is confirmed stable and is what Flutter’s toolchain documentation targets as of 2025.

Step 8: Download and Configure the Android SDK Command-Line Tools

You do not need Android Studio. The Android SDK Command-Line Tools package includes sdkmanager and avdmanager, which are everything Flutter requires to build for Android.

Visit developer.android.com/studio#command-tools to get the latest download identifier (the XXXXXXXX in the filename below). Replace it with the current build number shown on that page.

wget https://dl.google.com/android/repository/commandlinetools-linux-XXXXXXXX_latest.zip
unzip commandlinetools-linux-XXXXXXXX_latest.zip -d ~/.android-sdk
rm commandlinetools-linux-XXXXXXXX_latest.zip

Restructure the Directory Layout

This step is critical. The sdkmanager tool expects its binaries to live at cmdline-tools/latest/bin/. The zip archive does not create that structure automatically.

cd ~/.android-sdk
mv cmdline-tools latest
mkdir cmdline-tools
mv latest cmdline-tools/

Without this restructure, every sdkmanager command will fail with a directory not found error, even if the binary itself is present.

Configure Environment Variables

Add three variables to ~/.bashrc:

echo 'export ANDROID_HOME=$HOME/.android-sdk' >> ~/.bashrc
echo 'export ANDROID_USER_HOME=$HOME/.android' >> ~/.bashrc
echo 'export PATH=$ANDROID_HOME/cmdline-tools/latest/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
  • ANDROID_HOME tells Flutter where the SDK lives on disk.
  • ANDROID_USER_HOME stores AVD configuration and SDK cache data.
  • The PATH addition makes sdkmanager callable from any directory.

Verify sdkmanager is reachable:

sdkmanager --version

You should see a version number printed without errors.

Step 9: Install Android Build Tools, Platform Tools, and a Platform

Now use sdkmanager to install the three Android SDK components Flutter requires to build APKs.

Check Available Build-Tools Versions

sdkmanager --list | grep 'build-tools.*36'

You will see a list of available versions. Always install the latest stable release that does not carry an rc (release candidate) suffix.

Install Build Tools

sdkmanager --install 'build-tools;36.1.0'
echo 'export PATH=$ANDROID_HOME/build-tools/36.1.0:$PATH' >> ~/.bashrc
source ~/.bashrc

Install Platform Tools

sdkmanager --install platform-tools
echo 'export PATH=$ANDROID_HOME/platform-tools:$PATH' >> ~/.bashrc
source ~/.bashrc

platform-tools includes adb (Android Debug Bridge), which Flutter uses to communicate with physical Android devices and emulators.

Install an Android Platform

sdkmanager --install 'platforms;android-36'

Check docs.flutter.dev/platform-integration/android/setup for the current minimum recommended API level before picking a platform version.

Step 10: Accept Android SDK Licenses

This is a required step that many tutorials overlook. Without accepting the licenses, Gradle-based Android builds will fail immediately with a license error, regardless of how correctly everything else is set up.

flutter doctor --android-licenses

Flutter will display each license one at a time. Type y and press Enter for each one.

After accepting all licenses, run a final flutter doctor -v to confirm everything is in order:

flutter doctor -v

Expected Android toolchain output:

[✓] Android toolchain - develop for Android devices (Android SDK version 36.1.0)
    • Android SDK at /home/youruser/.android-sdk
    • Platform android-36, build-tools 36.1.0
    • Java version OpenJDK Runtime Environment (build 17.0.17-ea+8-Debian-1)
    • All Android licenses accepted.

Step 11: Configure Your IDE for Flutter on Debian 13 Setup

Flutter works with two IDEs on Debian 13. Choose based on your available RAM and workflow preferences.

VS Code (Recommended for Low-Resource Systems)

  1. Install VS Code from code.visualstudio.com or via Snap:
    sudo snap install code --classic
  2. Open VS Code and navigate to the Extensions panel.
  3. Search for Flutter (extension ID: Dart-Code.flutter) and install it.
  4. VS Code will auto-detect your Flutter SDK path from the PATH variable set in .bashrc.
  5. Open the command palette (Ctrl+Shift+P) and run Flutter: Run Flutter Doctor to confirm the IDE detects the full toolchain.

Android Studio (Full IDE Option)

Install via Snap:

sudo snap install android-studio --classic

On first launch, go to Plugins, search for Flutter, install the plugin, and restart the IDE. Android Studio will prompt you for the Flutter SDK path; provide ~/.flutter-sdk.

Step 12: Configure Flutter on Debian 13 and Create Your First App

With everything configured, create and run a test application to confirm the full setup works end to end.

Create the Project

flutter create my_first_app
cd my_first_app

Run as a Linux Desktop App

flutter run

A counter app window should open on your Debian 13 desktop. This confirms the Linux toolchain is fully functional.

Run as a Web App

flutter run -d web-server --web-hostname=0.0.0.0 --web-port=43101

Open a browser and navigate to http://localhost:43101. You should see the Flutter counter app running in the browser.

First Android Run

Connect a physical Android device with USB debugging enabled, or start an emulator. Then run:

flutter run

Important: The first Android flutter run will take 20 to 30 minutes. Flutter downloads Gradle, the Gradle wrapper, and all Java build dependencies during this first build. Do not interrupt the process. Use verbose mode to monitor progress:

flutter run -v

Subsequent builds will complete in seconds once the Gradle cache is populated.

Troubleshooting: Common Flutter Installation Errors on Debian 13

These are the most frequent issues developers encounter when they configure Flutter on Debian 13, along with their exact fixes.

Error 1: flutter: command not found

Cause: The PATH variable was not applied to the current shell session after being written to .bashrc.

Fix:

source ~/.bashrc
echo $PATH

Confirm that $HOME/.flutter-sdk/bin appears in the output. If not, check that the export line was correctly written to .bashrc:

cat ~/.bashrc | grep flutter

Error 2: clang not found During Linux Desktop Build

Cause: The Linux toolchain packages from Step 2 were not installed, or the install completed with errors.

Fix:

sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev

Run flutter doctor -v afterward and verify the Linux toolchain section shows green.

Error 3: Unable to find bundled Java version

Cause: Java is not installed, or the wrong version is active.

Fix:

sudo apt install openjdk-17-jdk openjdk-17-jre
java -version

If multiple Java versions are installed, set OpenJDK 17 as the default:

sudo update-alternatives --config java

Select the entry pointing to Java 17.

Error 4: sdkmanager: command not found

Cause: The ANDROID_HOME and PATH variables have not been sourced, or the cmdline-tools directory restructure in Step 8 was skipped.

Fix:

source ~/.bashrc
which sdkmanager

If which sdkmanager returns nothing, verify the directory structure manually:

ls ~/.android-sdk/cmdline-tools/latest/bin/

You should see sdkmanager listed there. If the latest/bin/ path does not exist, redo the directory restructure from Step 8.

Error 5: Android Licenses Block Gradle Builds

Cause: Step 10 (accepting licenses) was skipped or only partially completed.

Symptom: Gradle builds fail with: You have not accepted the license agreements of the following SDK components.

Fix:

flutter doctor --android-licenses

Type y for every prompt. Then run flutter doctor -v and confirm the output says All Android licenses accepted.

Congratulations! You have successfully installed Flutter. Thanks for using this tutorial for installing the Flutter open-source UI software development kit on your Debian 13 “Trixie” Linux system. For additional or useful information, we recommend you check the official Flutter website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!
r00t is a dedicated and highly skilled Linux Systems Administrator with over a decade of progressive experience in designing, deploying, and maintaining enterprise-grade Linux infrastructure. His professional journey began in the telecommunications industry, where early exposure to Unix-based operating systems ignited a deep and enduring passion for open-source technologies and server administration.​ Throughout his career, r00t has demonstrated exceptional proficiency in managing large-scale Linux environments, overseeing more than 300 servers across development, staging, and production platforms while consistently achieving 99.9% system uptime. He holds advanced competencies in Red Hat Enterprise Linux (RHEL), Debian, and Ubuntu distributions, complemented by hands-on expertise in automation tools such as Ansible, Terraform, Bash scripting, and Python.

Related Posts