You are not logged in.

#1 2024-04-27 12:34:49

nazavr
Member
Registered: 2024-04-27
Posts: 2

[SOLVED] Pacman is broken after system crash during an update

So, I just tried to update my system with

❯ sudo pacman -Syu

The system froze during an update (after the download phase as far as I can recall), so I had to shut it down via the power button. It boots fine, but running the pacman update again results in the following error:

pacman: error while loading shared libraries: /usr/lib/libarchive.so.13: file too short

I run the updates quite often, so the number of packages wasn't too big. Here they are:

❯ find /var/cache/pacman/pkg -size 0
/var/cache/pacman/pkg/perl-mozilla-ca-20240313-1-any.pkg.tar.zst.sig
/var/cache/pacman/pkg/perl-mozilla-ca-20240313-1-any.pkg.tar.zst
/var/cache/pacman/pkg/libarchive-3.7.3-3-x86_64.pkg.tar.zst
/var/cache/pacman/pkg/containerd-1.7.16-1-x86_64.pkg.tar.zst.sig
/var/cache/pacman/pkg/libavif-1.0.4-3-x86_64.pkg.tar.zst
/var/cache/pacman/pkg/containerd-1.7.16-1-x86_64.pkg.tar.zst
/var/cache/pacman/pkg/libavif-1.0.4-3-x86_64.pkg.tar.zst.sig
/var/cache/pacman/pkg/libarchive-3.7.3-3-x86_64.pkg.tar.zst.sig

The libarchive is among them, which in my understanding is now the corrupted dependency of pacman, which causes it to break.
This is the first time such thing happens to me, so I just wanted to ask what would be the right way of solving this? Do I really have to go over the procedure described in the wiki, taking into account that I can boot into the system? Or can I (for example) use the pacman-static to reinstall the corrupted packages (which seems to be faster and easier in this situation?
If so, can you please tell me what are the steps I need to perform? Should I remove anything first or just update the system one more time using pacman-static?

Last edited by nazavr (2024-04-27 15:00:51)

Offline

#2 2024-04-27 14:08:07

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,405
Website

Re: [SOLVED] Pacman is broken after system crash during an update

pacman-static should work if you can download it.

Offline

#3 2024-04-27 14:59:52

nazavr
Member
Registered: 2024-04-27
Posts: 2

Re: [SOLVED] Pacman is broken after system crash during an update

Managed to fix it by downloading pacman-static and reinstalling the corrupted packages with

sudo pacman -S --overwrite "*"

Thanks!

Offline

Board footer

Powered by FluxBB