Linux Setup

Install the system dependencies required for Tauri v2 development on popular Linux distributions

Tauri relies on a few system‑level libraries to compile a Rust application that can display web content. On Linux, these libraries are not always installed by default. This guide walks you through exactly what you need for Tauri v2 development, why each piece matters, and how to install everything on the most common distributions.

Why Linux Needs Separate Setup

Tauri uses the operating system’s own web engine instead of bundling a full browser. On Linux that engine is WebKitGTK, the same rendering engine used by GNOME Web and numerous other GTK applications. Tauri needs development headers for WebKitGTK so the Rust compiler can link against it. In addition, Tauri depends on libraries for secure networking (OpenSSL), system tray integration, SVG rendering, and basic build tooling like a C compiler. Without these, the Rust compilation will fail with cryptic linker errors.

The setup is only required for development and building. End‑users running your finished Tauri app do not need to install any of these packages — the final binary either links dynamically against system libraries that are already present or bundles them, depending on the packaging format.

Tauri v2 Requires WebKitGTK 4.1:

Tauri v2 uses the webkit2gtk-4.1 series. Tauri v1 used webkit2gtk-4.0. Installing the wrong version will result in build errors that look like could not find package webkit2gtk-4.0 or mismatched symbol names. Double‑check that you are installing the 4.1 variant.

What Each Package Does

Before running commands, it helps to know what you are putting on your system. Here is a plain‑language breakdown of the core dependencies:

  • libwebkit2gtk-4.1-dev — The heart of the operation. Provides the headers and libraries Tauri’s Rust bindings need to create and control a webview window.
  • build-essential / base-devel / "C Development Tools" — Installs gcc, g++, make, and related tools. Many Rust crates with native code (like openssl-sys) compile C components, so a working C toolchain is mandatory.
  • libssl-dev / openssl-devel — OpenSSL development files. Required by rustls or native-tls backends that handle HTTPS requests inside your Rust backend.
  • libayatana-appindicator3-dev / libappindicator-gtk3 — Provides the system tray icon API. If your app uses a tray, Tauri needs this library at compile time.
  • librsvg2-dev / librsvg — Renders SVG icons, used by GTK and the app indicator. Missing this often leads to blank or broken tray icons.
  • libxdo-dev / xdotool — Simulates X11 keyboard and mouse input. Tauri uses it for some window manipulation and automation features under X11.
  • curl, wget, file — Utilities that build scripts (both Tauri’s own tooling and third‑party crate build scripts) may invoke during compilation.

Installing the Dependencies

The steps below cover the most commonly used distributions. Select your distribution at each step to see the exact commands.

1

Step 1: Update the package index

Always refresh your package manager’s database first. This ensures you download the latest available versions and avoids “package not found” errors caused by stale metadata.

sudo apt update
2

Step 2: Install the required packages

Copy the block that matches your distribution. On a fresh system this might take a few minutes as it pulls down compiler toolchains and several dozen development headers.

sudo apt install libwebkit2gtk-4.1-dev \
  build-essential \
  curl \
  wget \
  file \
  libxdo-dev \
  libssl-dev \
  libayatana-appindicator3-dev \
  librsvg2-dev

On Ubuntu 22.04 or newer and Debian 12, all these packages are available in the main repository. If you see “unable to locate package”, run sudo apt update again.

3

Step 3: Verify the installation

After the packages are installed, confirm that the WebKitGTK development files are discoverable. This is the most common point of failure, so checking now saves time later.

pkg-config --modversion webkit2gtk-4.1

You should see a version number like 2.44.0 or similar. If the command prints “No package ‘webkit2gtk-4.1’ found”, the -dev package was not installed correctly.

Everything looks correct:

If pkg-config reports a version number without errors, your system is ready for Tauri development. The Rust build system will be able to find and link against WebKitGTK and all the other libraries you installed.

What About Other Distributions?

If your distribution is not listed above — Void Linux, Solus, Slackware, NixOS, or a more niche variant — the Tauri team does not publish official commands. The community‑curated Awesome Tauri repository often contains distribution‑specific guides. For NixOS in particular, you can look for community flakes that encapsulate the correct buildInputs.

The universal requirement is simple: you need the WebKitGTK 4.1 development headers, a C toolchain, and the development libraries for OpenSSL, librsvg, and a system tray indicator. If you can install those through your package manager, Tauri will likely compile.

Common Pitfalls

Installing webkit2gtk-4.0 instead of 4.1
The Tauri v2 migration swapped the WebKitGTK version. If you follow an older tutorial that mentions libwebkit2gtk-4.0-dev, you will get a cascade of linker errors about missing symbols. The fix is always the 4.1 series.

Missing a C compiler
The package list includes build-essential, base-devel, or an equivalent. On minimal containers (Docker, LXC, or cloud images) this group is often absent. The first sign is a build error that mentions cc or gcc not being found. Revisit the install step and make sure the build tools are present.

Forgetting to reboot on OSTree
On Fedora Silverblue and similar, rpm-ostree install only stages the packages. The new layered filesystem becomes active after a reboot. Attempting to compile before rebooting will give “package not found” errors from pkg-config.

Building on a very old distribution
The glibc version on your build machine determines the minimum glibc requirement of the final binary. If you build on Ubuntu 24.04 and try to run the app on Ubuntu 20.04, it may fail with a glibc version mismatch. A common practice is to build on the oldest distribution you plan to support, then test forward. If you need maximum compatibility, consider using an older LTS release or a container for the build.

Running Tauri’s own verify step
After installing the dependencies, setting up Rust (see Installing Rust via rustup), and preparing Node.js (see Installing Node.js), Tauri’s CLI provides a built‑in check:

cargo tauri info

This prints the versions of all required system libraries it can detect, along with Rust toolchain information. It is a quick way to spot a missing package without starting a full build. For a broader summary of prerequisites, revisit the System Dependencies Overview.