Skip to content

[Bug] Linux appimage : "Unsloth cannot start because required Linux libraries are missing" #8463

Closed

Description

@ndeybach

Note: Please do not remove the questions. Answer beside them.

  1. Did you update? pip install --upgrade unsloth unsloth_zoo
    Yes, fresh latest release download

  2. Colab or Kaggle or local / cloudlocal Desktop Unsloth (beta)

  3. Number GPUs used, use nvidia-smi
    2 GPUs:

GPU 1: AMD Radeon 890M Graphics [Integrated]
GPU 2: NVIDIA GeForce RTX 5070 Max-Q / Mobile [Discrete]
  1. Which notebook? Please link!
    Irrelevant

  2. Which Unsloth version, TRL version, transformers version, PyTorch version?
    Desktop AppImage 0.1.70_beta

  3. Which trainer? SFTTrainer, GRPOTrainer etc```pythonPut Minimal code to reproduce error here ###Remove Hugging Face token###
    Irrelevant


Context:

The just released unsloth desktop is crashing under linux appimage package when just opening it:

Image

Text:

Unsloth cannot start because required Linux libraries are missing:

libwebkit2gtk-4.1.so.0
libjavascriptcoregtk-4.1.so.0

On Ubuntu or Linux Mint, install them with:
sudo apt install libayatana-appindicator3-1 libwebkit2gtk-4.1-0 libgtk-3-0

Under fedora 44 KDE if that matters (but it shouldn't for an AppImage as it should package everything it needs inside it).

Activity

  1. ahmad110abbas commented on Aug 11, 2026

    @ahmad110abbas

    🔍 Root Cause Analysis

    1. "Thin AppImage" Design Choice in Unsloth Studio:
      Unsloth Desktop for Linux is built using Tauri (which uses GTK3 and WebKit2GTK for the desktop frontend). To ensure full compatibility with host NVIDIA, AMD ROCm, and Intel GPU display drivers, Unsloth builds a Thin AppImage (configured in studio/src-tauri/linux/build-thin-appimage.sh).

      Bundling heavy GTK3/WebKit2GTK binaries inside an AppImage breaks OpenGL hardware acceleration and host GPU drivers. Therefore, Unsloth relies on the host Linux distribution to supply GTK3 and WebKit2GTK.

    2. Why It Fails on Fedora KDE:

      • KDE Desktop vs. GNOME: Fedora KDE edition uses Qt/KDE by default and does not pre-install GNOME/GTK3 web rendering libraries (webkit2gtk-4.1).
      • When Unsloth Studio launches, AppRun checks ldd for required shared libraries. Finding libwebkit2gtk-4.1.so.0 missing, it pops up the error dialog.
    3. Incomplete Error Hint:
      The error prompt currently only gives the apt installation command for Ubuntu/Debian/Mint, omitting package names for Fedora (dnf), Arch (pacman), or openSUSE (zypper).


    💡 Solution for Users

    On Fedora / RHEL / CentOS:

    Run:

    sudo dnf install webkit2gtk4.1 gtk3 libappindicator-gtk3

    On Arch Linux / Manjaro:

    Run:

    sudo pacman -S webkit2gtk-4.1 gtk3 libappindicator-gtk3

    On openSUSE:

    Run:

    sudo zypper install libwebkit2gtk-4_1-0 libgtk-3-0

    On Ubuntu / Debian / Linux Mint:

    Run:

    sudo apt install libwebkit2gtk-4.1-0 libgtk-3-0 libayatana-appindicator3-1

    🛠️ Suggested Code Fix for Unsloth Codebase

    In studio/src-tauri/linux/build-thin-appimage.sh:L214, update the error message to include package instructions for Fedora and Arch:

    message="Unsloth cannot start because required Linux libraries are missing:
    
    $missing
    
    To install them:
    • Fedora:  sudo dnf install webkit2gtk4.1 gtk3 libappindicator-gtk3
    • Ubuntu:  sudo apt install libwebkit2gtk-4.1-0 libgtk-3-0 libayatana-appindicator3-1
    • Arch:    sudo pacman -S webkit2gtk-4.1 gtk3 libappindicator-gtk3"
  2. ndeybach commented on Aug 11, 2026

    @ndeybach
    Author

    "In studio/src-tauri/linux/build-thin-appimage.sh:L214, update the error message to include package instructions for Fedora and Arch:"

    @ahmad110abbas , please stop using LLMs for eveything (and a bad one / badly used at least). Your "proposed fix" is terrible advise.

    Installing AppImages on Fedora or any other distribution is perfectly normal and expected way.

    There is a AppImage build and this is normal and why AppImage was created on first place.

    The real fix would be correctly building the AppImage and including the libraries it needs without expecting anything (up to the correct limits, but I am not sure you are familliar with it anyway) from the OS / distro.

  3. poppa-k commented on Aug 11, 2026

    @poppa-k

    Ran into same issue - also on latest Fedora KDE. Agree with OP, libraries should be inside the AppImage. That's what they're designed for.

  4. ahmad110abbas commented on Aug 11, 2026

    @ahmad110abbas

    "In studio/src-tauri/linux/build-thin-appimage.sh:L214, update the error message to include package instructions for Fedora and Arch:"

    @ahmad110abbas , please stop using LLMs for eveything (and a bad one / badly used at least). Your "proposed fix" is terrible advise.

    Installing AppImages on Fedora or any other distribution is perfectly normal and expected way.

    There is a AppImage build and this is normal and why AppImage was created on first place.

    The real fix would be correctly building the AppImage and including the libraries it needs without expecting anything (up to the correct limits, but I am not sure you are familliar with it anyway) from the OS / distro.

    hello @ndeybach ,

    you made a very fair point about AppImage that it should be self contained, allowing it to run seamlessly across any Linux distribution without external dependencies.

    But here you can see ThinAppImage is used instead of AppImage and that is because Unsloth Desktop leverages Tauri (which depends on GTK3 and WebKit2GTK for its web-based desktop frontend) and heavily interacts with host-level GPU drivers (NVIDIA/CUDA, AMD ROCm/VA-API), fully bundling native GUI and display/rendering libraries inside an AppImage often leads to ABI mismatches and breaks OpenGL/Mesa hardware acceleration with host graphics drivers.

    Thanks

  5. ndeybach commented on Aug 11, 2026

    @ndeybach
    Author

    @ahmad110abbas ,

    "ThinAppImage" is not a thing. An AppImage is an AppImage. It should just not depend on the system libs almost at all anyway. It is up to the developper / packager to put the limits of interaction between the system and the AppImage correctly. And this was not done correctly here !

    If you rely on system libs for GTK and Webkit: this is not an AppImage but a failure of build chain. Reevaluting the build chain is what a real fix should be here !
    Many app (most either use Qt or GTK under the hood for native rendering) use GTK .... they package as AppImages just fine when done correctly.


    Furthermore, the "heavily interacts with host-level GPU" aspect of things is not going to be solved by using rpm or deb or whatever package. The packages are then used by different distros, different distro versions, with different GPUs driver versions and builds and flags etc...

    AppImage is even the best way to avoid a bit more those pain points if you really wanted to (which I think truthfully is just what shipping software well should be anyway : handling edge cases correctly): you package the relevant libraries for unsloth deskop !

    Cuda libs or mesa or whatever (except opengl that usually shouldn't be as it is distro specific in many way and very stable in the ABI anyway), you just bundle it in the appimage.


    And if you want to go further or optimize on AppImage size: you build a libs handler and downloader to download the relevant libs for compute in the app ! That is exactly what LMStudio and other apps using GPU heavily do !

    This would even improve portability and size and clashes with other packages too !

    GTK and webkit though are "light" enough that this is irrelevant in the current problem stated here.


    And as a last point on: "fully bundling native GUI and display/rendering libraries inside an AppImage often leads to ABI mismatches and breaks OpenGL/Mesa hardware acceleration with host graphics drivers."

    .... then how did all other similar apps or any other linux app using GPU fix this aspect perfectly fine and ship fully working and well build AppImages ?!? Please document yourself a bit more on the matter. Yes display / compute libraries are messy and finicky to package. This is not new. Not saying it is easy.... but it is not a reason to dismiss AppImage from the get go because the build system is a vibecoded mess done without understanding of what is going on and should be done !

  6. ahmad110abbas commented on Aug 11, 2026

    @ahmad110abbas

    Hi @ndeybach,

    Thanks for sharing your thoughts. I want to clarify why I brought up the "Thin AppImage" architecture in my previous comment.

    I completely agree with your point regarding user experience and standard AppImage philosophy: users on distros like Fedora KDE or Arch expect an AppImage to be plug-and-play without needing to install additional system packages via apt or dnf.

    However, within the Unsloth repository specifically, the current build setup (build-thin-appimage.sh and test_release_desktop_appimage.py) was intentionally created by the core maintainers to produce what is referenced in the repo as a "Thin AppImage".

    The rationale behind stripping GTK3 and WebKit2GTK from the bundle was to avoid mixing bundled GLib binaries with host GIO modules, networking libraries, and host Mesa/NVIDIA graphics drivers, which previously caused display and driver initialization issues on several Linux setups. Automated tests were added to explicitly fail the build if those host desktop libraries are packaged inside the AppImage.

    That being said, your point about UX is valid: if we continue using this approach, the app should provide proper instructions for non-Debian distros (or the project can evaluate alternative packaging options like Flatpak or a fully bundled runtime). My earlier comment was simply explaining the exact build script logic currently used in this repository, not dismissing the need for a smoother setup for Fedora and Arch users.

  7. ndeybach commented on Aug 11, 2026

    @ndeybach
    Author

    @ahmad110abbas ,

    Again, it is not something that should be addressed with "proper instructions for non-Debian distros".

    1. Debian is a small part of the linux ecosystem and AppImages shouldn't be built specific to it !! This is counter to all the objectives of AppImages !!!
    2. Again GTK and WebKit are very much widely used in a multitude of software on linux. A lot have perfectly fine working AppImages.
    3. GTK and Webkit have nothing to do with the compute side of things, they are only for the graphic interface. And if so, a tremenduous amount of AppImages use them and work perfectly fine as AppImages (after the obvious correct early fixes / handling / build system that I am talking about !). Those are rellying on standard and stable ABIs and libraries (and again, most of the libs should be bundled, then they will interface with the driver stack that are usually forward compatible in most cases. I am pretty sure you are currently separating the system and AppImage at the wrong level !).

    If for those aspect you deem it a source of bugs / clashes that you shouldn't resolve on the unsloth desktop side : this is going to be the same with other packages: How are you going to handle the potential drift of drivers between a rpm running Fedora 44 and Fedora 42 ? Worst: how to handle a rpm running Fedora 44 vs OpenSuse 16 ???

    So please, stop looping on the idiosyncratic "but we will document it" .... this is a terrible way in all aspects. You should properly overall the build system and build correct AppImages. That is the proper fix !!


    PS: Reading your answers really still feels like reading a LLM answer... I am pretty tired to loop arround the subject. I personnaly find it nice that a new option in the ecosystem is realising, but if the feedback is taken like that and the engineering as badly concidered ... well, good luck with the mess 🫡

  8. ahmad110abbas commented on Aug 11, 2026

    @ahmad110abbas

    Your point about making AppImages fully standalone across all Linux distributions without relying on host package managers is completely valid. I've noted your feedback regarding the GTK/WebKit packaging boundaries and build chain overhaul for the maintainers to evaluate when revisiting the Linux desktop release pipeline.
    Appreciate your input!

  9. self-assigned this
    on Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions