Need help with system update

so after having a problem at boot (bailing out error) i managed to fix it by running fsck -f on my partition and hitting y for about 50 files to overwrite etc, this happened after firefox crashing while watching a youtube video.
now for some reason i’ve been unable to update my system, here’s my terminal output:

[ramon@ramon-m61pmes2p ~]$ LANG=C yay -Syu
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community is up to date
 multilib is up to date
 endeavouros is up to date
:: Starting full system upgrade...
resolving dependencies...
error: could not open file /var/lib/pacman/local/qt5-base-5.15.1-3/desc: No such file or directory
error: could not open file /var/lib/pacman/local/rhash-1.4.0-1/desc: No such file or directory
looking for conflicting packages...

Packages (8) bison-3.7.2-1  gpm-1.20.7.r38.ge82d1a6-3  imagemagick-7.0.10.33-1  iw-5.9-1
             libtool-2.4.6+42+gb88cebd5-14  mesa-20.2.0-2  openssh-8.4p1-1  whois-5.5.7-1

Total Installed Size:  107,09 MiB
Net Upgrade Size:        4,39 MiB

:: Proceed with installation? [Y/n] y
(8/8) checking keys in keyring                               [--------------------------------] 100%
(8/8) checking package integrity                             [--------------------------------] 100%
(8/8) loading package files                                  [--------------------------------] 100%
(8/8) checking for file conflicts                            [--------------------------------] 100%
error: failed to commit transaction (conflicting files)
libtool: /usr/bin/libtool exists in filesystem
libtool: /usr/bin/libtoolize exists in filesystem
libtool: /usr/include/libltdl/lt_dlloader.h exists in filesystem
libtool: /usr/include/libltdl/lt_error.h exists in filesystem
libtool: /usr/include/libltdl/lt_system.h exists in filesystem
libtool: /usr/include/ltdl.h exists in filesystem
libtool: /usr/lib/libltdl.so exists in filesystem
libtool: /usr/lib/libltdl.so.7 exists in filesystem
libtool: /usr/lib/libltdl.so.7.3.1 exists in filesystem
libtool: /usr/share/aclocal/libtool.m4 exists in filesystem
libtool: /usr/share/aclocal/ltargz.m4 exists in filesystem
libtool: /usr/share/aclocal/ltdl.m4 exists in filesystem
libtool: /usr/share/aclocal/ltoptions.m4 exists in filesystem
libtool: /usr/share/aclocal/ltsugar.m4 exists in filesystem
libtool: /usr/share/aclocal/ltversion.m4 exists in filesystem
libtool: /usr/share/aclocal/lt~obsolete.m4 exists in filesystem
libtool: /usr/share/info/libtool.info-1.gz exists in filesystem
libtool: /usr/share/info/libtool.info-2.gz exists in filesystem
libtool: /usr/share/info/libtool.info.gz exists in filesystem
libtool: /usr/share/libtool/COPYING.LIB exists in filesystem
libtool: /usr/share/libtool/Makefile.am exists in filesystem
libtool: /usr/share/libtool/Makefile.in exists in filesystem
libtool: /usr/share/libtool/README exists in filesystem
libtool: /usr/share/libtool/aclocal.m4 exists in filesystem
libtool: /usr/share/libtool/build-aux/compile exists in filesystem
libtool: /usr/share/libtool/build-aux/config.guess exists in filesystem
libtool: /usr/share/libtool/build-aux/config.sub exists in filesystem
libtool: /usr/share/libtool/build-aux/depcomp exists in filesystem
libtool: /usr/share/libtool/build-aux/install-sh exists in filesystem
libtool: /usr/share/libtool/build-aux/ltmain.sh exists in filesystem
libtool: /usr/share/libtool/build-aux/missing exists in filesystem
libtool: /usr/share/libtool/config-h.in exists in filesystem
libtool: /usr/share/libtool/configure exists in filesystem
libtool: /usr/share/libtool/configure.ac exists in filesystem
libtool: /usr/share/libtool/libltdl/lt__alloc.h exists in filesystem
libtool: /usr/share/libtool/libltdl/lt__argz_.h exists in filesystem
libtool: /usr/share/libtool/libltdl/lt__dirent.h exists in filesystem
libtool: /usr/share/libtool/libltdl/lt__glibc.h exists in filesystem
libtool: /usr/share/libtool/libltdl/lt__private.h exists in filesystem
libtool: /usr/share/libtool/libltdl/lt__strl.h exists in filesystem
libtool: /usr/share/libtool/libltdl/lt_dlloader.h exists in filesystem
libtool: /usr/share/libtool/libltdl/lt_error.h exists in filesystem
libtool: /usr/share/libtool/libltdl/lt_system.h exists in filesystem
libtool: /usr/share/libtool/libltdl/slist.h exists in filesystem
libtool: /usr/share/libtool/loaders/dld_link.c exists in filesystem
libtool: /usr/share/libtool/loaders/dlopen.c exists in filesystem
libtool: /usr/share/libtool/loaders/dyld.c exists in filesystem
libtool: /usr/share/libtool/loaders/load_add_on.c exists in filesystem
libtool: /usr/share/libtool/loaders/loadlibrary.c exists in filesystem
libtool: /usr/share/libtool/loaders/preopen.c exists in filesystem
libtool: /usr/share/libtool/loaders/shl_load.c exists in filesystem
libtool: /usr/share/libtool/lt__alloc.c exists in filesystem
libtool: /usr/share/libtool/lt__argz.c exists in filesystem
libtool: /usr/share/libtool/lt__dirent.c exists in filesystem
libtool: /usr/share/libtool/lt__strl.c exists in filesystem
libtool: /usr/share/libtool/lt_dlloader.c exists in filesystem
libtool: /usr/share/libtool/lt_error.c exists in filesystem
libtool: /usr/share/libtool/ltdl.c exists in filesystem
libtool: /usr/share/libtool/ltdl.h exists in filesystem
libtool: /usr/share/libtool/ltdl.mk exists in filesystem
libtool: /usr/share/libtool/slist.c exists in filesystem
libtool: /usr/share/man/man1/libtool.1.gz exists in filesystem
libtool: /usr/share/man/man1/libtoolize.1.gz exists in filesystem
Errors occurred, no packages were upgraded.
error installing repo packages

which command should i use to overwrite libtool ? still a bit confused here sorry

Which bit of the above thread related to conflicting files (and how to fix/overwrite them) is confusing? Let me know so I can rewrite it to make it as clear as possible.

i would like to have a suggestion for the most recommended terminal commands to run here and fix the problem, i just don’t feel too confident, i am not very experienced with that sorta of problem, right now i am getting this when running pacman -Qo /path/to/file:

[ramon@ramon-m61pmes2p ~]$ LANG=C pacman -Qo /path/to/file
error: could not open file /var/lib/pacman/local/qt5-base-5.15.1-3/files: No such file or directory
error: could not open file /var/lib/pacman/local/rhash-1.4.0-1/files: No such file or directory
error: No package owns /path/to/file
[ramon@ramon-m61pmes2p ~]$ 

You are conflating the two issues, for which I have posted two links.

Take the two issues separately and fix them in turn.

is there any risk to break the system if i just try to reinstall qt5-base and rhash ?

None, that is one of the steps from the first thread above (though you will have to put placeholder files in place to allow that to happen).

i already ran these commands this morning:

sudo touch /var/lib/pacman/local/qt5-base-5.15.1-3/desc
sudo touch /var/lib/pacman/local/rhash-1.4.0-1/desc

and i noticed commands like this won’t work:

sudo pacman -S qt5-base

If you post the full output someone might be able to provide specific help rather than guess.

LANG=C sudo touch /var/lib/pacman/local/rhash-1.4.0-1/desc
[ramon@ramon-m61pmes2p ~]$ LANG=C sudo pacman -S rhash
warning: rhash-1.4.0-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
error: could not open file /var/lib/pacman/local/rhash-1.4.0-1/files: No such file or directory
warning: could not fully load metadata for package rhash-1.4.0-1
error: failed to prepare transaction (invalid or corrupted package)
[ramon@ramon-m61pmes2p ~]$ 

You have addressed the first missing file (desc), but there is another one to put in place (files) before reinstalling the package will work.

So basically now i need to run:

sudo touch /var/lib/pacman/local/rhash-1.4.0-1/files

?

Apparently the first issue is gone, just one more to fix

This is probably one of the worst issues you can face with corrupt local metadata, so after you fix this you’ll be able to fix anything. :wink:

tried to run a bunch of terminal commands here, but none of these worked, i need to backup these files before trying this ?

sudo pacman -S libtool --overwrite usr/bin/libtool,usr/bin/libtoolize,usr/include/libltdl/*
sudo pacman -S libtool --overwrite usr/include/ltdl.h
sudo pacman -S libtool --overwrite usr/lib/*
sudo pacman -S libtool --overwrite usr/share/aclocal/*
sudo pacman -S libtool --overwrite usr/share/info/*
sudo pacman -S libtool --overwrite usr/share/libtool/*
sudo pacman -S libtool --overwrite usr/share/libtool/build-aux/*
sudo pacman -S libtool --overwrite usr/share/libtool/libltdl/*
sudo pacman -S libtool --overwrite usr/share/libtool/loaders/*
sudo pacman -S libtool --overwrite usr/share/man/man1/libtool.1.gz
sudo pacman -S libtool --overwrite usr/share/man/man1/libtoolize.1.gz

The question is: why do you have these conflicts?
It could be that you have installed another similar package from the AUR.

So could you show the output of command:

  pacman -Qs libtool
[ramon@ramon-m61pmes2p ~]$ pacman -Qs libtool
[ramon@ramon-m61pmes2p ~]$ 


You could try this from the links of @jonathon :

sudo pacman -S libtool --overwrite '*'

but make sure your personal data is backed up.

can i run the command exactly like it is or is it just a template ?