Manjaro 手动降级 AUR 应用

2018-12-31 · 775 chars · 4 min read

平时工作用的笔记本装的 Manjaro 系统,然后公司有一些必须的办公软件并不支持 Linux,所以极其依赖 Virtualbox。就在昨天,看到 yay 提示有软件可升级,随手升了下,悲剧的升级 virtualbox-ext-oracle 时报错,之后发现虚拟机启动不了了:

Packages (1) virtualbox-ext-oracle-6.0.0-1

Total Installed Size:  13.76 MiB
Net Upgrade Size:       3.36 MiB

:: Proceed with installation? [Y/n]
(1/1) checking keys in keyring                                                   [##############################################] 100%
(1/1) checking package integrity                                                 [##############################################] 100%
(1/1) loading package files                                                      [##############################################] 100%
(1/1) checking for file conflicts                                                [##############################################] 100%
(1/1) checking available disk space                                              [##############################################] 100%
:: Processing package changes...
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
(1/1) upgrading virtualbox-ext-oracle                                            [##############################################] 100%
0%...
Progress state: NS_ERROR_FAILURE
VBoxManage: error: Failed to install "/usr/share/virtualbox/extensions/Oracle_VM_VirtualBox_Extension_Pack-6.0.0.vbox-extpack"
VBoxManage: error: Failed to load the main module ('/usr/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack/linux.amd64/VBoxPuelMain.so'): VERR_FILE_NOT_FOUND - /usr/lib/virtualbox/ExtensionPacks/Oracle_VM_VirtualBox_Extension_Pack/linux.amd64/VBoxPuelMain.so: undefined symbol: _ZNK16RTCRestArrayBase9baseCloneEv
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ExtPackManagerWrap, interface IExtPackManager
VBoxManage: error: Context: "RTEXITCODE handleExtPack(HandlerArg*)" at line 1211 of file VBoxManageMisc.cpp
error: command failed to execute correctly
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...

排查后发现是 virtualbox-ext-oracle 升级到了 6,而 virtualbox v6 依然处在测试阶段:

解决方案只有两个:

  1. 等 virutalbox 相关应用全部升级到 6
  2. 手动将 virtualbox-ext-oracle 降级到 5

因为是 virtualbox 中跑的 windows 7 系统是日常必备的,所以没辙,只能手动降级。

downgrade#

首先想到的就是 downgrade,使用 downgrade 降级十分简单,以 firefox 为例,执行  DOWNGRADE_FROM_ALA=1 downgrade firefox

$ DOWNGRADE_FROM_ALA=1 downgrade firefox

Downgrading from A.L.A. is disabled on the stable branch. To override this behavior, set DOWNGRADE_FROM_ALA to 1 .
See https://wiki.manjaro.org/index.php?title=Using_Downgrade  for more details.

Available packages:

   1) firefox-64.0-1-x86_64.pkg.tar.xz (remote)
*  2) firefox-64.0-0-x86_64.pkg.tar.xz (local)
*  3) firefox-63.0.3-1-x86_64.pkg.tar.xz (remote)
*  4) firefox-63.0.3-1-x86_64.pkg.tar.xz (local)
*  5) firefox-63.0.3-0-x86_64.pkg.tar.xz (local)
*  6) firefox-63.0.1-1-x86_64.pkg.tar.xz (remote)
*  7) firefox-63.0.1-1-x86_64.pkg.tar.xz (local)
   8) firefox-63.0-2-x86_64.pkg.tar.xz (remote)
*  9) firefox-63.0-1-x86_64.pkg.tar.xz (remote)
* 10) firefox-63.0-1-x86_64.pkg.tar.xz (local)
* 11) firefox-63.0-0-x86_64.pkg.tar.xz (local)
  12) firefox-62.0.3-2-x86_64.pkg.tar.xz (remote)
* 13) firefox-62.0.3-1-x86_64.pkg.tar.xz (remote)
* 14) firefox-62.0.3-1-x86_64.pkg.tar.xz (local)
* 15) firefox-62.0.3-0-x86_64.pkg.tar.xz (local)
  16) firefox-62.0.2-1-x86_64.pkg.tar.xz (remote)
* 17) firefox-62.0.2-0-x86_64.pkg.tar.xz (local)
* 18) firefox-62.0-1-x86_64.pkg.tar.xz (remote)
* 19) firefox-62.0-1-x86_64.pkg.tar.xz (local)
* 20) firefox-62.0-0-x86_64.pkg.tar.xz (local)
* 21) firefox-61.0.2-1-x86_64.pkg.tar.xz (remote)
* 22) firefox-61.0.2-1-x86_64.pkg.tar.xz (local)
  23) firefox-61.0.1-2-x86_64.pkg.tar.xz (remote)
* 24) firefox-61.0.1-1-x86_64.pkg.tar.xz (remote)
* 25) firefox-61.0.1-1-x86_64.pkg.tar.xz (local)
* 26) firefox-61.0-1-x86_64.pkg.tar.xz (remote)
* 27) firefox-60.0.2-1-x86_64.pkg.tar.xz (remote)
* 28) firefox-60.0.1-1-x86_64.pkg.tar.xz (remote)
  29) firefox-60.0-1-x86_64.pkg.tar.xz (remote)
  30) firefox-59.0.2-3-x86_64.pkg.tar.xz (remote)

select a package by number:

选择一个版本安装即可,然后 downgrade 并不是任何时候都有效,例如我现在想降级的 virtualbox-ext-oracle 就不行。下面是 downgrade 的介绍

It is a very easy to use terminal program that enables you to downgrade packages from your system cache or from the Arch Linux Archive – A.L.A (formally the Arch Linux Rollback Machine – A.R.M) database.

而 virtualbox-ext-oracle 是 ARU 软件

手动降级#

首先找到 virtualbox-ext-oracle 的 git 仓库:

clone 下来后,查看 git log:

* 424217e - (2 days ago)     commit virtualbox-ext-oracle 6.0.0-1 - Christian Hesse (origin/master, origin/HEAD, master)
* 495258d - (7 weeks ago)     commit virtualbox-ext-oracle 5.2.22-1 - Christian Hesse (HEAD)
* 10d3b74 - (2 months ago)     commit virtualbox-ext-oracle 5.2.20-1 - Christian Hesse
* 21fc976 - (5 months ago)     commit virtualbox-ext-oracle 5.2.18-1 - Christian Hesse
* 05cc4fb - (5 months ago)     commit virtualbox-ext-oracle 5.2.10-1 - Christian Hesse
* a3cb846 - (6 months ago)     commit virtualbox-ext-oracle 5.2.10-1 - Christian Hesse
* 4672c55 - (8 months ago)     commit virtualbox-ext-oracle 5.2.12-1 - Christian Hesse
* 8f463cf - (9 months ago)     commit virtualbox-ext-oracle 5.2.10-1 - Christian Hesse
* 142e487 - (10 months ago)     commit virtualbox-ext-oracle 5.2.8-1 - Christian Hesse
* 5d991fb - (12 months ago)     Bump 5.2.6 (really this time, fix typo) - Christian Hesse

checkout 到 5.2.22-1 这个 commit,然后执行  makepkg :

之后就可以在当前目录下看到 virtualbox-ext-oracle-5.2.22-1-any.pkg.tar.xz 文件。

卸载掉 virtualbox-ext-oracle 6

sudo pacman -Rsn virtualbox-ext-oracle

然后直接安装 virtualbox-ext-oracle-5.2.22-1-any.pkg.tar.xz 即可:

sudo pacman -U virtualbox-ext-oracle-5.2.22-1-any.pkg.tar.xz
赞赏

微信