文章目录
解决 Arch/Manjaro Linux 仓库更新签名报错
sudo pacman-key --init && sudo pacman-key --populate && sudo pacman -Syyu
解决 Arch/Manjaro Linux 软件包更新报错需要手动干预软件包升级
如 firewalld
包在 0.8.1-2 之前的版本打包时遗漏了编译 python
模块。这已在 0.8.1-2 中修复,所以更新时需要覆盖掉没有被跟踪到的 pyc
文件。如果你升级时遇到如下报错:
firewalld: /usr/lib/python3.8/site-packages/firewall/__pycache__/__init__.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/__pycache__/client.cpython-38.pyc exists in filesystem
firewalld: /usr/lib/python3.8/site-packages/firewall/__pycache__/dbus_utils.cpython-38.pyc exists in filesystem
...更多报错...
请使用如下命令升级:
sudo pacman -Suy --overwrite /usr/lib/python3.8/site-packages/firewall/\*
如果升级 firewalld
前删除了 firewalld
包,下次安装 firewalld
包仍然会有文件冲突,此时请使用:
sudo pacman -Suy --overwrite /usr/lib/python3.8/site-packages/firewall/\* firewalld
扩展
同样以后遇到 Arch/Manjaro Linux 升级遇到软件包报错,可以使用:
sudo pacman -Suy --overwrite /usr/\*
补充:解决 Arch 系 GnuPG
密钥更新失败的问题
将 hkp://keyserver.ubuntu.com
替换成国内能访问的 GnuPG
密钥服务器
sudo cat > /etc/pacman.d/gnupg/gpg.conf << EOF
keyserver hkp://keyserver.ubuntu.com
no-greeting
no-permission-warning
lock-never
keyserver-options timeout=10
keyserver-options import-clean
keyserver-options no-self-sigs-only
EOF
更新 GnuPG
密钥
sudo pacman-key --refresh-keys
gpg: 正在更新 185 把密钥,从 hkp://keyserver.ubuntu.com
gpg: 密钥 4AC5588F941C2A25:“Antonio Rojas <arojas@archlinux.org>” 未改变
gpg: 密钥 FCF3C8CB5CF9C8D4:“Alexander Rødseth <rodseth@gmail.com>” 未改变
gpg: 密钥 9D893EC4DAAF9129:“Bruno Pagani <bruno.pagani@ens-lyon.org>” 未改变
gpg: 密钥 FC1B547C8D8172C8:“Levente Polyak (anthraxx) <levente@leventepolyak.net>” 未改变
gpg: 密钥 94657AB20F2A092B:“Andreas Radke <andyrtr@archlinux.org>” 未改变
gpg: 密钥 F6B1610B3ECDBC9F:“Andrew Crerar <andrew@crerar.io>” 未改变
gpg: 密钥 B02854ED753E0F1F:“Anatol Pomozov <anatol.pomozov@gmail.com>” 未改变
gpg: key AFF5D95098BC6FF5: 3 duplicate signatures removed
gpg: key AFF5D95098BC6FF5: 3 signatures reordered
gpg: 密钥 AFF5D95098BC6FF5:“Maxime Gauduin <alucryd@alucryd.xyz>” 未改变
gpg: 密钥 F99FFE0FEAE999BD:“Allan McRae <me@allanmcrae.com>” 未改变
gpg: key 6BC26A17B9B7018A: no user ID for key signature packet of class 13
gpg: key 6BC26A17B9B7018A: no user ID for key signature packet of class 13
gpg: key 6BC26A17B9B7018A: no user ID for key signature packet of class 13
gpg: key 6BC26A17B9B7018A: no user ID for key signature packet of class 13
gpg: key 6BC26A17B9B7018A: no user ID for key signature packet of class 13
...
手动添加 GnuPG
密钥
gpg --keyserver keyserver.ubuntu.com --recv-key AB9942E6D4A4CFC3412620A749FC7012A5DE03AE
gpg: 密钥 49FC7012A5DE03AE:公钥 “Jason A. Donenfeld <Jason@zx2c4.com>” 已导入
gpg: 处理的总数:1
gpg: 已导入:1