I somehow bricked my system. I guess it might stem from trying to update with no disk space remaining which apparently lets pacman create empty files. At least that is what I read somewhere in the past 2 hours.
When I started booting into linux recently, the computer told me that I would need to load the kernel first. Then it did nothing. I also tried using the failback kernel - still nothing. So I now chrooted into the system from a liveiso.
I first tried pacman -Syu which only threw errors at me. The main one seems to be
ldconfig: /usr/lib/libldl.so.3.0.0 is not an ELF file - it has the wrong magic bytes at the start
but repeated several times (all lines at the bottom of the post). I guess there are around 15 error messages, though there are not 15 different libs affected. Several websites recommended just doing a system upgrade - that doesnt work though. Others have suggested removing the packages affecting the afforementioned libraries, but how do I do that? The libraries have rather ominous names and looking the first few up online didn’t help either.
What can I do to make my system do anything again? How can I find out which package uses / installed a certain library? Any help is greatly appreciated.
Manually written error message, please pardon any spelling in there:
ldconfig: /usr/lib/libldl.so.3.0.0 is not an ELF file - it has the wrong magic bytes at the start.
and several more that I am to exhausted to type here. I tried getting the singles that repeat here with uniq, that didn't work at all. Sorry.
I should be running on linux 5.15.80-1 (LTS kernel), but uname -r returns 5.19.4-arch1-1, which is weird. That kernel isn’t even installed as per pacman -Qs.
I rebooted and performed the following series just now (which magically worked, I don’t know anymore). I am fairly sure I did the same before. The drive had always been mounted, I know that much. /home is on another partition, but the problem appears to be in root, so I did not mount that.
sudo mount /dev/nvme.. /mnt
I am chrooted now, it can’t find the command. Should I temporarily extend $PATH or move to file to another folder, as in /usr/bin?
I did sudo it, I do have do type these things by hand which makes me a bit clumsy.
I downloaded it from the browser and cp’d it into the then already mounted path, /mnt that is. It is now in / for the other system. I tried both sudo ./pacman-statc aswell as sudo /pacman-static just now, both returned command not found.