Corrupted package database

After a recent update pamac has been corrupting the package database.

Running

pamac update -a

yields:

Error: multilib.db: GPGME error: No data
invalid or corrupted database (PGP signature)
Failed to synchronize databases

Running

sudo pacman -Syyu

then results in an error:

error: GPGME error: No data
error: failed to synchronize all databases (invalid or corrupted database (PGP signature))

If I remove the signature files:

sudo rm /var/lib/pacman/sync/*sig

then pacman works fine again, but as soon as I try to update with pamac, the problem returns.

I tried removing the gnupg keys and repopulating the key database, but that has no effect.

1 Like

Please see this. Pamac is not corrupting any package

However we can notice an increase recently of this specific issue, many users seems to have been impacted.

Maybe worth having some Manjaro team members think of a possible cause of this issue, if multiple people at around the same time have the same issue, something is going on.

//EDIT: maybe something to look at, two weeks ago multiple mirrors seemed to have had a rollback of many packages suddenly, after investigating I found that they have their repo databases with different packages version than what they contain… so this may be something to investigate. Currently one mirror still has this issue, the manjaro.re mirror. Maybe more mirrors still have the issue but for now I switch to the Global mirror to stop being bothered by the issue.

I think this has something to do with the CDN based mirrors.

I am using my own mirror - which is syncing directly with the master repo - and I don’t have this issue.

Try creating a mirror pool without the Global mirrors - exclude them when creating a custom pool

pacman-mirrors --interactive --continent

I didn’t say pamac was corrupting any packages, I said pamac was corrupting the database. (See the error message.) It seems to be a problem with the signatures. Turning off signature checking solves the problem, but that is not really the solution we want.

The thing is - there is no signatures for the databases.

I have been troubleshooting this issue some time ago and as I recall it the issue manifest when curl receives a 200 OK when downloading a database which in reality is a html document e.g. a custom error 404 document.

My troubleshooting is documented here

1 Like

Pamac is not corrupting any package or package database. :slight_smile:

If i’m not mistaken that is a mirror from Denmark, but i had a small hiccup with 2 mirrors from Germany too.

No it is from the Germany pool.

//EDIT: this may be unrelated though, but I think it was worth mentioning it.

1 Like

OK, if the databases are not being signed, then the solution:

SigLevel = Required DatabaseNever

would appear to be the correct approach. It gets rid of all the error messages.

Funny though, that this problem started a week or so ago, even though I had not changed pacman.conf for some time…

1 Like

Looking at the pacman.conf.packnew i see:

SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional

and for the repo-name headers there is nothing, while on my older pacman.conf i see:

SigLevel = PackageRequired

And this pacman.conf.packnew file is created in 17.09.2021 that somehow matches to

I recall this change being old, and don’t recall a recent pacman.conf.pacnew, I may be wrong though and may not remember well (I check .pacnew at every update).

generally, this error is only a bad mirror, nothing to change in config

original pacman.conf (.pacnew) is here

for view your config for multilib (if use costum SigLevel …)

pacman-conf -r multilib

I use mirrors from the US and it’s been a week or so but I had an issue with pamac where I couldn’t update so I switched the mirrors to worldwide and updated with no issues.After a reboot I changed the mirrors back to the US and have had no issues since.My pacman.conf has the SigLevel = Required DatabaseOptional as that was a change a few months ago.

I am having the same issue, when try to install/update through pamac the gpg keys get damaged.

I had similar problems. I am running RebornOS with pamac 10.3.0-1. Turned out I didn’t manually run, Refresh databases from the hamburger menu in pamac, so I kept seeing the same error in pamac.

sudo pacman -Syyu was working, but pamac wasn’t until I manually ran Refresh databases.