当前位置: 首页>>技术教程>>正文


什么是“AppImage”?我如何安装它?

, ,

问题描述

我刚刚读了Meet Etcher, A Stylish Open-Source USB Image Writer Tool。它谈到了下载AppImage。

Yes, Linux; the Linux packages is distributed as an .appimage for 32-bit and 64-bit distributions, and should run across all major Linux distributions without any issues. The team currently have no plan to provide a native .deb (or .rpm) installer.

什么是AppImages?它们与卡扣有什么不同?

最佳解决办法

基本信息

关于安装

我在这里引用appImage项目页面:

AppImages can be downloaded and run without installation or the need for root rights.

使其可执行

你可以像下面这样创建appImage可执行文件:

chmod a+x exampleName.AppImage

执行它

你可以执行一个appImage,如下所示:

./exampleName.AppImage

附加信息

关于appImage

你可以找到一些关于appImage here的一般信息。

我在这里引用appImage项目页面:

The key idea of the AppImage format is one app = one file. Every AppImage contains an app and all the files the app needs to run. In other words, each AppImage has no dependencies other than what is included in the targeted base operating system(s).

Wikipedia添加

AppImage (and the predecessors klik and portablelinuxapps) do not install software in the traditional sense (i.e., it do not put files all over the place in the system).

It use one file per application. Each one is self-contained: it includes all libraries the application depends on and that are not part of the base system. In this regard, it is similar to “application virtualization”. One can use a AppImage file even if they are not a superuser, or they are using a live CD. AppImage files are often simpler than compiling and installing an application, as no installation actually took place. The AppImage file is a compressed image which is temporarily mounted to allow access to the program, but not having to extract the program or modify the underlying system.

AppImageKit-projectREADME.md提供了许多附加信息,如用例,问题空间和目标。

用例

  • 作为用户,我想要转到上游下载页面,从原作者下载应用程序,然后在我的Linux桌面系统上运行它,就像我在Windows或Mac应用程序上运行一样。

  • 作为一名测试人员,我希望能够从连续构建服务器获取最新的bleeding-edge应用程序版本,并在我的系统上进行测试,无需编译,也不必担心可能会弄乱我的系统。

  • 作为一名应用程序作者或ISV,我希望为Linux桌面系统提供软件包,就像我为Windows和OS X所做的那样,无需获得’into’发行版,也无需为不同发行版的gazillions构建软件包。

Objectives

  1. 很简单。 AppImage旨在成为一种非常简单的格式,易于理解,创建和管理。

  2. 保持二进制兼容性。 AppImage是二进制软件分发的格式。作为AppImage打包的软件尽可能与尽可能多的系统一样作为binary-compatible。应该大大减少(重新)编译软件的需要。

  3. 是distribution-agostic。一个AppImage应该在它创建的所有基本操作系统(发行版)上运行(以及更高版本)。例如,您可以同时针对Ubuntu 9.10,openSUSE 11.2和Fedora 13(及更高版本),而无需为每个目标系统创建和维护单独的软件包。

  4. 取消安装的需要。 AppImages包含的应用程序格式允许它直接从存档运行,而无需先安装。这与Live CD相当。在Live CD之前,必须先安装操作系统才能使用它们。

  5. 始终保持应用程序的压缩。由于应用程序始终保持打包状态,因此永远不会在硬盘上解压缩。计算机在访问应用程序时解压缩应用程序on-the-fly。由于在大多数系统上解压缩比从硬盘读取更快,除了节省空间之外,这具有速度优势。另外,安装所需的时间也完全消失了。

  6. 允许在任何地方放置应用。 AppImages是”relocatable”,因此允许用户从任何位置(包括CD-ROMs,DVD,可移动磁盘,USB memory 棒)存储和执行它们。

  7. 创建应用程序read-only。由于AppImages是read-only的设计,因此用户可以合理确信应用程序在操作过程中不会自行修改。

  8. 不需要重新编译。 AppImages必须可以从already-existing二进制文件创建,而不需要重新编译。这大大加快了AppImage的创建过程,因为不需要编译器。这也允许第三方将closed-source应用程序打包为AppImages。 (尽管如此,对于上游应用程序开发人员来说,专门为生成AppImage而从源代码构建可能会有所帮助。)

  9. 保持基本操作系统不变。由于AppImages旨在在管理员尚未专门准备的普通系统上运行,因此AppImages可能不需要任何不寻常的基本操作系统准备工作。因此,他们不能依赖特殊的内核补丁,内核模块或任何缺省情况下不包含目标分发的应用程序。

  10. 不需要root。由于AppImages旨在由最终用户运行,因此它们不应要求安装或使用管理帐户(root)。但是,如果需要,它们可以由管理员安装(例如,在multi-user方案中)。

次佳解决办法

两个系统之间的基本想法可能看起来相似,但是对齐和Appimages之间有一些设计差异。

我想到的一些”big”是:

  1. Security,根据confinement。捕捉软件包运行在沙箱中,并且不允许它们从其中逃逸并到达系统中他们不应触及的其他部分。这是一个与权限系统并行运行的更强大的安全层。显然,在开始(以及之后)处理它时有点令人沮丧,但如果从系统管理的角度考虑它,这是管理员想要为他们的用户所做的事情。

  2. 安全。从网上安装软件的安装与在街道上舔舔杆一样安全。有时候什么都没有发生,有时你会遇到一些非常大的健康问Snap软件包有其正确的存储库,由Canonical控制,就像通常的标准Ubuntu存储库一样。你可以继续安装.deb文件,但这将是你的选择,而不是设计问题。

  3. 安装。 AppImages意味着等同于“便携式Windows可执行文件”。所有库都是self-contained,任何用户都可以下载并执行其中的一个。另一方面,snap软件包是正确的软件包,需要通过apposite软件包管理器(如rootsudo)进行安装(snap install tic-tac-toe会引发错误:需要sudo!)

  4. 去除。要删除捕捉包,您需要使用具有正确权限的包管理器snap remove ...来执行此操作。 Appimages,另一方面,他们只是”there”。那么任何用户都不想要那个Appimage?他/她只是删除文件,它已经消失。

虽然我强烈建议使用Appimages时要谨慎,但我个人亲自使用其中的一些。

我发现它们对我的工作系统特别有用,我没有root访问权限(只有管理员有这个权限),但我需要开发人员以Appimage形式提供的特定软件的最新版本。

我有点害怕他们确实包含了一些恶意代码,所以我尽可能检查了出版商的身份。我不是100%肯定这个软件是良性的,但我尽我所能。

第三种解决办法

虽然snap只专注于Ubuntu,但AppImage是cross-distribution,也可以在Fedora,Debian,openSUSE,CentOS等上运行。

AppImage不需要Linux发行版的运行时或基础架构支持,因此无处不在。它使应用程序作者能够将他们的软件直接发布给Linux用户,比如Windows和OS X;没有Canonical或任何其他”in between”软件作者和最终用户。

如果应用程序以AppImage格式提供,则用户可以到原作者的网站下载它,例如https://musescore.org/en/download的MuseScore。使AppImage可执行(使用文件管理器或chmod a+x ./yourAppImage),然后您可以通过double-clicking简单运行应用程序。

第四种办法

在运行AppImage之前,您需要使其可执行。这是一项Linux安全功能。有两种主要的方法可以使AppImage可执行:

1.使用GUI

packaging,appimage,ubuntu

要么

2.在命令行上

chmod a+x Some.Appimage

参考资料

本文由Ubuntu问答整理, 博文地址: https://ubuntuqa.com/article/546.html,未经允许,请勿转载。