DioxusLabs/dioxus · error · anyhow::Error

linuxdeploy failed with exit code

Error message

linuxdeploy failed with exit code {:?}
stdout:
{}
stderr:
{}

What it means

The linuxdeploy AppImage tool exited with a non-zero status while building the AppDir into an AppImage. The CLI captures and reports linuxdeploy's stdout/stderr along with the exit code to explain the packaging failure.

Solutions

  1. linuxdeploy failed. Read the printed stdout and stderr and install the missing dependencies it reports.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at packages/cli/src/bundler/linux.rs:89 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23). Data as JSON: /api/errors/59c99ff2aeefaac5. Report an issue: GitHub.

Appendix: source

Thrown at packages/cli/src/bundler/linux.rs:89

        let output = Command::new(linuxdeploy)
            .arg("--appdir")
            .arg(&appdir)
            .arg("--output")
            .arg("appimage")
            .env("OUTPUT", &appimage_path)
            // Run the linuxdeploy AppImage in extract-and-run mode to avoid host
            // runtime/FUSE differences on distros and CI runners.
            .env("APPIMAGE_EXTRACT_AND_RUN", "1")
            .env("NO_STRIP", "true")
            .current_dir(&output_dir)
            .output()
            .await
            .with_context(|| format!("Failed to run linuxdeploy: {}", linuxdeploy.display()))?;

        if !output.status.success() {
            let stdout = String::from_utf8_lossy(&output.stdout);
            let stderr = String::from_utf8_lossy(&output.stderr);
            bail!(
                "linuxdeploy failed with exit code {:?}\nstdout:\n{}\nstderr:\n{}",
                output.status.code(),
                stdout.trim(),
                stderr.trim()
            );
        }

        if !appimage_path.exists() {
            let found = find_appimage_output(&output_dir, &name)?;
            if let Some(found_path) = found {
                if found_path != appimage_path {
                    fs::rename(&found_path, &appimage_path).with_context(|| {
                        format!(
                            "Failed to rename {} to {}",
                            found_path.display(),
                            appimage_path.display()
                        )
                    })?;

View on GitHub (pinned to 24f6a829df)