Arch之软件降级
用Arch Linux就是每天睡觉关机前滚一下,然而有时候有些软件升级滚出问题,比如glibc-2.28
就导致了R
安装包有问题,会抛出下面的错误:
terminate called after throwing an instance of 'std::runtime_error'
what(): Mutex creation failed
用blogdown
编译博客也同样会抛出这个错误。
然后electron
也有问题,《开源的macOS和linux版微信》跑着跑着突然CPU就狂飙。
解决办法就是安装回老版本,但pacman
永远是最新的,当然可以去git/svn仓库里找老版本的PKGBUILD
,然后再makepkg
,但经常会在signature checking
这步报错,你还得到导入keyring
,挺麻烦。
这时候我找到了downgrade
脚本:
Bash script for downgrading one or more packages to a version in your cache or the A.L.A.
AUR有收录,安装非常简单:
~/github/PAM master yay -S downgrade
[sudo] password for ygc:
resolving dependencies...
looking for conflicting packages...
Packages (1) downgrade-6.0.0-2
Total Download Size: 0.01 MiB
Total Installed Size: 0.12 MiB
:: Proceed with installation? [Y/n]
:: Retrieving packages...
downgrade-6.0.0-2-any 9.0 KiB 242K/s 00:00 [###########] 100%
(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...
(1/1) installing downgrade [###########] 100%
Optional dependencies for downgrade
sudo: for installation via sudo [installed]
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
这时候,我就可以用它来降低glibc
的版本了,运行会列出各种版本:
~/github/PAM master downgrade glibc
Available packages:
* 1) glibc-2.28-1-x86_64.pkg.tar.xz (remote)
* 2) glibc-2.28-1-x86_64.pkg.tar.xz (local)
3) glibc-2.27-3-x86_64.pkg.tar.xz (remote)
4) glibc-2.27-2-x86_64.pkg.tar.xz (remote)
5) glibc-2.26-11-x86_64.pkg.tar.xz (remote)
6) glibc-2.26-10-x86_64.pkg.tar.xz (remote)
7) glibc-2.26-9-x86_64.pkg.tar.xz (remote)
8) glibc-2.26-8-x86_64.pkg.tar.xz (remote)
9) glibc-2.26-7-x86_64.pkg.tar.xz (remote)
10) glibc-2.26-6-x86_64.pkg.tar.xz (remote)
11) glibc-2.26-5-x86_64.pkg.tar.xz (remote)
12) glibc-2.26-4-x86_64.pkg.tar.xz (remote)
13) glibc-2.26-3-x86_64.pkg.tar.xz (remote)
14) glibc-2.26-2-x86_64.pkg.tar.xz (remote)
15) glibc-2.26-1-x86_64.pkg.tar.xz (remote)
16) glibc-2.25-7-x86_64.pkg.tar.xz (remote)
17) glibc-2.25-6-x86_64.pkg.tar.xz (remote)
18) glibc-2.25-5-x86_64.pkg.tar.xz (remote)
19) glibc-2.25-4-x86_64.pkg.tar.xz (remote)
20) glibc-2.25-3-x86_64.pkg.tar.xz (remote)
21) glibc-2.25-2-x86_64.pkg.tar.xz (remote)
22) glibc-2.25-1-x86_64.pkg.tar.xz (remote)
23) glibc-2.24-2-x86_64.pkg.tar.xz (remote)
24) glibc-2.24-1-x86_64.pkg.tar.xz (remote)
25) glibc-2.23-5-x86_64.pkg.tar.xz (remote)
26) glibc-2.23-4-x86_64.pkg.tar.xz (remote)
27) glibc-2.23-3-x86_64.pkg.tar.xz (remote)
28) glibc-2.23-2-x86_64.pkg.tar.xz (remote)
29) glibc-2.23-1-x86_64.pkg.tar.xz (remote)
30) glibc-2.22-4-x86_64.pkg.tar.xz (remote)
只需要选择其中某一个,就会自动下载安装:
select a package by number: 3
glibc-2.27-3-x86_64 9.1 MiB 4.68M/s 00:02 [#################################################] 100%
glibc-2.27-3-x86_64.sig 310.0 B 0.00B/s 00:00 [#################################################] 100%
loading packages...
warning: downgrading package glibc (2.28-1 => 2.27-3)
resolving dependencies...
looking for conflicting packages...
Packages (1) glibc-2.27-3
Total Installed Size: 41.40 MiB
Net Upgrade Size: -4.15 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...
(1/1) downgrading glibc [#################################################] 100%
warning: /etc/locale.gen installed as /etc/locale.gen.pacnew
Generating locales...
en_US.UTF-8... done
zh_CN.UTF-8... done
Generation complete.
:: Running post-transaction hooks...
(1/4) Reloading system manager configuration...
(2/4) Creating temporary files...
(3/4) Arming ConditionNeedsUpdate...
(4/4) Updating the info directory file...
add glibc to IgnorePkg? [y/n] n
~/github/PAM master
于是升级带来的各自烦人的bug,就没有了。
往期精彩 + Support Vector Machine + 来香港读博其实是被逼的 + emojifont新功能(有视频哦) + 单篇引用超过500了,来了解一下 + 你们想要的: Linux装windows的二逼 + facet_plot: 加图层到特定的分面上 + 就是这么简单,你也能够纯代码生成六角贴! + 非模式基因GO富集分析:以玉米为例+使用OrgDb