Hello, Pacman’s database of installed software, /var/lib/pacman/local, has been deleted from my PC. So, I’m trying to restore it by following the steps prescribed here. I do have the /var/log/pacman.log and the /var/lib/pacman/local/ALPM_DB_VERSION files on my system.
However, in the first step, it says to “Install the pacman-contrib package to get paclog-pkglist.”
How do I do that? Since doing sudo pacman -S pacman-contrib tries to install the required dependencies too, but they are already installed (pacman doesn’t know that of course). And so it raises the “already exists in the filesystem” error.
The problem is that we don’t know what state your system is in. Therefore, I can give you a quick fix, but it is dangerous, not recommended unless one knows what one is doing, and it could also completely ruin your system.