I did some further digging, and found this
https://bbs.archlinux.org/viewtopic.php?id=275685The command
sudo rm -r /var/lib/pacman/sync/
fixed the problem for me.
This is the solution.
]]>pacman -Syyu
Please check the pacman manpage on what that actually does and why there's a very good chance that this bad habit contributed or is the outright cause for your initial problems.
Then stop doing it.
(If you don't understand the meaning or are too lazy to look at the manpage: you're provoking database corruptions and putting an undue burden on the mirror for no good reason but to provoke corruptions of your local database)
The command
sudo rm -r /var/lib/pacman/sync/
fixed the problem for me.
]]>❯ sudo pacman --database --check
[sudo] password for nuub:
error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
No database errors have been found!
The last time I updated was prolly 2 days ago, and now I can't upgrade or install any thing.
]]> bash-5.1$ doas pacman -Syyu
and it gave me this error
error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
:: Synchronizing package databases...
core 156.2 KiB 124 KiB/s 00:01 [#####################################################] 100%
extra 1699.9 KiB 702 KiB/s 00:02 [#####################################################] 100%
community 4.4 MiB 1504 KiB/s 00:01 [######################################################] 100%
error: GPGME error: No data
error: GPGME error: No data
error: GPGME error: No data
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))