It seems you have a partially updated system, so what you you have to do (as others have stated) is update the system. On the other hand, you can not update with pacman as it is broken. Try to update with pamac:
Sorry, but what are you talking about? I was answering to the OP. You are free to use whatever you want. So I can’t be “wrong”. It’s just a matter of taste. Anyway as far as I know pamac is the official and prefered package manager of Manjaro.
yes, first message is is confused, but I understand that it does not have an error with pacman, it is just after installing yay (without “-y”) that it has an error with yay. So i suppose than pacman (5) run also well
The library comes with the pacman package.
Unless he just grabbed the pacman binary instead of installing the package, this issue can not happen with pacman.
Altough OP states there is an issue with pacman, the output he has given is telling that he’s trying to use yay… (which seems to be an outdated version)