温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

怎么将DEB软件包转换成Arch Linux软件包

发布时间:2021-09-01 20:37:05 来源:亿速云 阅读:211 作者:chen 栏目:系统运维

本篇内容主要讲解“怎么将DEB软件包转换成Arch Linux软件包”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“怎么将DEB软件包转换成Arch Linux软件包”吧!

Debtap - 将 DEB 包转换成 Arch Linux 包

为此,我们将使用名为 “Debtap” 的实用程序。 它代表了 DEB T o A rch (Linux) P ackage。 Debtap 在 AUR 中可以使用,因此您可以使用 AUR 辅助工具(如 Pacaur、Packer 或 Yaourt )来安装它。

使用 pacaur 安装 debtap 运行:

pacaur -S debtap

使用 Packer 安装:

packer -S debtap

使用 Yaourt 安装:

yaourt -S debtap

同时,你的 Arch 系统也应该已经安装好了 bashbinutilspkgfilefakeroot 包。

在安装 Debtap 和所有上述依赖关系之后,运行以下命令来创建/更新 pkgfile 和 debtap 数据库。

sudo debtap -u

示例输出是:

==> Synchronizing pkgfile database...:: Updating 6 repos... download complete: archlinuxfr [ 151.7 KiB 67.5K/s 5 remaining] download complete: multilib [ 319.5 KiB 36.2K/s 4 remaining] download complete: core [ 707.7 KiB 49.5K/s 3 remaining] download complete: testing [ 1716.3 KiB 58.2K/s 2 remaining] download complete: extra [ 7.4 MiB 109K/s 1 remaining] download complete: community [ 16.9 MiB 131K/s 0 remaining]:: download complete in 131.47s < 27.1 MiB 211K/s 6 files >:: waiting for 1 process to finish repacking repos...==> Synchronizing debtap database... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 34.1M 100 34.1M 0 0 206k 0 0:02:49 0:02:49 --:--:-- 180k % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 814k 100 814k 0 0 101k 0 0:00:08 0:00:08 --:--:-- 113k % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 120k 100 120k 0 0 61575 0 0:00:02 0:00:02 --:--:-- 52381 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 35.4M 100 35.4M 0 0 175k 0 0:03:27 0:03:27 --:--:-- 257k==> Downloading latest virtual packages list... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 149 0 149 0 0 49 0 --:--:-- 0:00:03 --:--:-- 44100 11890 0 11890 0 0 2378 0 --:--:-- 0:00:05 --:--:-- 8456==> Downloading latest AUR packages list... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 264k 0 264k 0 0 30128 0 --:--:-- 0:00:09 --:--:-- 74410==> Generating base group packages list...==> All steps successfully completed!

你至少需要运行上述命令一次。

现在是时候开始转换包了。

比如说要使用 debtap 转换包 Quadrapassel,你可以这样做:

debtap quadrapassel_3.22.0-1.1_arm64.deb

上述的命令会将 DEB 包文件转换为 Arch Linux 包。你需要输入包的维护者和许可证,输入他们,然后按下回车键就可以开始转换了。

包转换的过程可能依赖于你的 CPU 的速度从几秒到几分钟不等。喝一杯咖啡等一等。

示例输出:

==> Extracting package data...==> Fixing possible directories structure differencies...==> Generating .PKGINFO file... :: Enter Packager name:quadrapassel :: Enter package license (you can enter multiple licenses comma separated):GPL *** Creation of .PKGINFO file in progress. It may take a few minutes, please wait... Warning: These dependencies (depend = fields) could not be translated into Arch Linux packages names:gsettings-backend ==> Checking and generating .INSTALL file (if necessary)... :: If you want to edit .PKGINFO and .INSTALL files (in this order), press (1) For vi (2) For nano (3) For default editor (4) For a custom editor or any other key to continue: ==> Generating .MTREE file... ==> Creating final package...==> Package successfully created!==> Removing leftover files...

:Quadrapassel 在 Arch Linux 官方的软件库中早已可用,我只是用它来说明一下。

如果在包转化的过程中,你不想回答任何问题,使用 -q 略过除了编辑元数据之外的所有问题。

debtap -q quadrapassel_3.22.0-1.1_arm64.deb

为了略过所有的问题(不推荐),使用 -Q

debtap -Q quadrapassel_3.22.0-1.1_arm64.deb

转换完成后,您可以使用 pacman 在 Arch 系统中安装新转换的软件包,如下所示。

sudo pacman -U <package-name>

显示帮助文档,使用 -h

$ debtap -hSyntax: debtap [options] package_filename Options:  -h --h -help --help Prints this help message -u --u -update --update Update debtap database -q --q -quiet --quiet Bypass all questions, except for editing metadata file(s) -Q --Q -Quiet --Quiet Bypass all questions (not recommended) -s --s -pseudo --pseudo Create a pseudo-64-bit package from a 32-bit .deb package -w --w -wipeout --wipeout Wipeout versions from all dependencies, conflicts etc. -p --p -pkgbuild --pkgbuild Additionally generate a PKGBUILD file -P --P -Pkgbuild --Pkgbuild Generate a PKGBUILD file only

到此,相信大家对“怎么将DEB软件包转换成Arch Linux软件包”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI