无法在 Ubuntu 22.04 上运行 AppImage？这是解决方法
AppImage
![](/data/attachment/album/202205/21/093854fdcjm47bqyjm6vqz.jpg)


最近发布的 [Ubuntu 22.04 LTS 充满了新的视觉变化和功能](https://itsfoss.com/ubuntu-22-04-release-features/)。


但与任何其他版本一样，它也存在一些错误和问题。


我在 Ubuntu 22.04 中遇到的令人不快的惊喜之一是 AppImage 应用。


即使拥有所有正确的权限，AppImage 应用也会拒绝在我新安装的 Ubuntu 22.04 系统中启动。


如果你遇到类似的情况，我有个好消息要告诉你。修复非常简单。


### 在 Ubuntu 22.04 LTS 中运行 AppImage 应用


这里的问题是 Ubuntu 22.04 缺少 [FUSE（用户空间中的文件系统）库](https://packages.debian.org/sid/libfuse2)。FUSE 库为用户空间程序提供了一个接口，可以将虚拟文件系统导出到 Linux 内核。


这就是 [AppImage 在虚拟文件系统上的工作方式](https://itsfoss.com/use-appimage-linux/)。由于缺少这个关键库，AppImage 无法按预期工作。


现在你了解了问题的根本原因，让我们看看如何使其工作。


#### 第 1 步：安装 libfuse


在 Ubuntu 中打开终端并使用以下命令安装 FUSE 库支持：



```
sudo apt install libfuse2

```

如果你不熟悉终端，那么你需要了解以下内容。它会要求你输入 `sudo` 密码。实际上，那是你的帐户密码。 **当你输入密码时，屏幕上不会显示任何内容**。这是设计使然。只需继续输入密码并输入。


![Install libfuse2 in Ubuntu](/data/attachment/album/202205/21/093924hv3mo2hvodrroz28.png)


#### 第 2 步：确保 AppImage 文件具有正确的文件权限


这个不用说了。你需要对下载的应用的 AppImage 文件具有“执行”权限。


转到你已下载所需应用的 AppImage 文件的文件夹。右键单击并选择<ruby> 属性 <rt>  Properties </rt></ruby>。


现在转到<ruby> 权限 <rt>  Permissions </rt></ruby>选项卡并选中“<ruby> 允许将文件作为程序执行 <rt>  Allow executing file as program </rt></ruby>”选项。


![give execute permission to AppImage file](/data/attachment/album/202205/21/093924bz46gt3asaair1dn.png)


设置完成后就好了。现在只需双击该文件，它就会按预期运行应用。


获取 libfuse 的这个小步骤已经在我的 [安装 Ubuntu 22.04 后推荐要做的事情列表](https://itsfoss.com/things-to-do-after-installing-ubuntu-22-04/) 上了。


### 进一步的故障排除提示


你的 AppImage 文件仍未运行？你下载的 AppImage 可能会出现一些其他问题，使其无法运行。


检查它的一种方法是下载一个已知的应用，如 [Balena Etcher](https://www.balena.io/etcher/) 并查看其 AppImage 文件是否有效。如果这个没问题，那么当你下载的另一个应用的 AppImage 文件无法工作，你可以通过从终端运行 AppImage 文件并分析它显示的错误来深入挖掘。


### 对你有用吗？


继续尝试。如果有效，请给我写个“感谢”。如果仍然没有解决，请在评论部分中提及详细信息，我会尽力帮助你。


（该图片由 [Ryan McGuire](https://pixabay.com/zh/users/ryanmcguire-123690/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=362150) 在 [Pixabay](https://pixabay.com/zh/?utm_source=link-attribution&utm_medium=referral&utm_campaign=image&utm_content=362150) 上发布）




---


via: <https://itsfoss.com/cant-run-appimage-ubuntu/>


作者：[Abhishek Prakash](https://itsfoss.com/author/abhishek/) 选题：[lkxed](https://github.com/lkxed) 译者：[geekpi](https://github.com/geekpi) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
![Warp Terminal](/assets/images/warp-terminal.webp)


![Warp Terminal](/assets/images/warp-terminal.webp)

There are several applications that are made available for Linux in AppImage format.

However, the recent releases of Ubuntu do not provide the necessary support by default for AppImage applications.

Even with all the right permissions, AppImage applications just refused to launch in my newly installed Ubuntu 24.04 system. The same was the case for Ubuntu 22.04.

If you face a similar situation, I have good news for you. The fix is quite simple.

`libfuse2`

on Ubuntu 22.04. On Ubuntu 24.04, the same package is named `libfuse2t64`

.## Running AppImage applications in Ubuntu 22.04 and later versions

The problem here is that Ubuntu 22.04 is missing the [FUSE (Filesystem in Userspace) library](https://packages.debian.org/sid/libfuse2). This FUSE library provides an interface for userspace programs to export a virtual filesystem to the Linux kernel.

That’s [how the AppImage works](https://itsfoss.com/use-appimage-linux/); on a virtual filesystem. Since this crucial library is missing, AppImage doesn’t work as expected.

Now that you understand the issue's root cause, let’s see how to make it work.

### Step 1: Install libfuse2

First, [check the Ubuntu version you are running](https://itsfoss.com/how-to-know-ubuntu-unity-version/) with the following command in the terminal.

`lsb_release -a`


Observer the output:

```
abhishek@itsfoss:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble
```


**If it is Ubuntu 24.04**, you need to run the following command install the FUSE library:

`sudo apt install libfuse2t64`


**If it is Ubuntu 22.04**, you should use this command:

`sudo apt install libfuse2`


It's the same software library, just the package names are different in the two versions.

If you are [new to the Linux terminal](https://itsfoss.com/basic-terminal-tips-ubuntu/), here’s what you need to know. It will ask you to enter the sudo password. That’s your account password, actually. And ** when you type the password, nothing is displayed on the screen**. That’s by design. Just keep on typing the password and enter.

![install libfuse2 ubuntu](https://itsfoss.com/content/images/wordpress/2022/05/install-libfuse2-ubuntu.png)

### Step 2: Make sure AppImage files have correct file permissions

This one goes without saying. You need to have ‘execute’ permission on the downloaded AppImage file of an application.

If you directly try to run an AppImage with a double click, it shows this error:

Could not display appimage.

There is no application installed for “AppImage application bundle” files. Do you want to search for an application to open this file?

![appimage not running](https://itsfoss.com/content/images/wordpress/2022/08/appimage-not-running.png)

Go to the folder where you have downloaded the desired application’s AppImage file. **Right-click** on it and **select Properties**.

Now go to the **Permissions tab** and check the “**Allow executing file as program**” option.

![give execute permission to appimage file](https://itsfoss.com/content/images/wordpress/2022/05/give-execute-permission-to-appimage-file.png)

With that set, you are good to go. Double-click the file now, and it should run the application as intended.

This little step of getting libfuse is on my [list of recommended things to do after installing Ubuntu 22.04](https://itsfoss.com/things-to-do-after-installing-ubuntu-22-04/).

I made this video for the AppImage issue on Ubuntu 24.04.

## Further troubleshooting tips

Your AppImage file is still not running? The AppImage you have downloaded may have some other issues that stop it from running.

One way to check it would be to download a known application like [Balena Etcher](https://itsfoss.com/install-etcher-linux/) and see if its AppImage file works. If this one works, the AppImage file you downloaded for the other application is unsuitable.

You can dig deeper by running the AppImage file from the terminal and analyzing its error.

In the terminal, go to the location where the downloaded AppImage is located and run it the same way you execute a shell script.

`./application.appimage`


Here's an example:

```
abhishek@itsfoss:~/Downloads$ ./compress-pdf-v0.1-x86_64\ \(1\).AppImage
/tmp/.mount_compreWhr2rq/check: line 3: xterm: command not found
Traceback (most recent call last):
File "compress-pdf_Qt.py", line 5, in <module>
from PyQt5 import QtCore, QtGui, QtWidgets
ModuleNotFoundError: No module named 'PyQt5'
```


As you can see in the above example, the AppImage didn't run successfully and it showed an error.

What to do now? You can look for alternative packaging formats for the application and inform the developer about the issue you encountered. That's the sensible step here.

## Did it work for you?

If you want to learn more about AppImages, I highly recommend reading our [in-depth guide on AppImage](https://itsfoss.com/use-appimage-linux/). From best practices to desktop integration, the article discusses it all.

[How to Use AppImage in Linux [Complete Guide]What is AppImage? How to run it? How does it work? Here’s the complete guide about using AppImage in Linux.](https://itsfoss.com/use-appimage-linux/)![](https://itsfoss.com/content/images/wordpress/2017/07/use-appimage-linux.png)


![](https://itsfoss.com/content/images/wordpress/2017/07/use-appimage-linux.png)

💬 *Go ahead and try it. If it works, drop me a thank you note. If it still doesn’t, mention the details in the comment sections and I’ll try to help you.*