guara
(Daniele Guarascio)
April 8, 2024, 9:01am
1
Hi,
Yesterday after an upgrade, my system resulted in a broken state, I tried to chroot to it and the problem arise
flatpak: error while loading shared libraries: /lib64/libcap.so.2: file too short
if I try to run sudo
sudo: unable to allocate pty: No such device
dnf gives the same libcap error.
Any advise on how to fix the system without a clean install?
Did you force power off the computer after the update?
Is the disk full? Check output ofdf -h /
What does ls -l /lib64/libcap.so.2
tell you the size of the file is?
You could try booting from USB install stick and then mounting the disk and copying in a good version of libcap.so.2 from the USB stick system.
guara
(Daniele Guarascio)
April 8, 2024, 9:58am
3
Thanks for the suggestion, copying a good version of libcap did the trick, my version was 0 bytes…
I don’t know what happened, probably the pc rebooted for some reason before the update completed.
Thanks again!
You may find other files did not get written correctly.
But so long as dnf is working you can reinstall packages that provide any other damaged file.
glb
(Gregory Lee Bartholomew)
April 8, 2024, 5:39pm
5
Running sudo rpm -Va
should work to verify the files for all the installed packages. It will also list config files that have been changed which may or may not be significant depending on whether you made those changes intentionally. If you see binary files in the output from that command, you should probably reinstall the relevant package.
guara
(Daniele Guarascio)
April 9, 2024, 8:56pm
6
Thanks to both, everything else seems ok!