ssh升级arch意外中断

 · 0 分钟

用SSH升级Arch意外中断(以后不要这样升级了)

问题

Failed to init transaction (unable to lock database)

参见 ArchWiki - Pacman

# run `fuser /var/lib/pacman/db.lck` to make sure no other process is using it
rm /var/lib/pacman/db.lck

Failed to commit transaction (invalid pgp signature or corrupted package)

参考 Archlinux Forum

# debug 模式升级
pacman -Syyu --debug
# 出现错误时, 会提示
# 将对应的密钥删除,再重新导入
pacman-key --delete <key-id>
pacman-key --populate archlinux  # 也可能是别的key

后记

以后想想怎么优雅地解决远程升级问题