Unable to update: invalid or corrupted database

Encountered the following error on Pamac:
image

The Pamac log showed:

Preparing...
Synchronizing package databases...
Refreshing core.db...
Refreshing extra.db...
Refreshing multilib.db...
Refreshing core.files...
Refreshing extra.files...
Refreshing multilib.files...
Refreshing AUR...
Failed to prepare transaction:
invalid or corrupted database

Encountered the following error using CLI.

 sudo pacman -Syu                                                                                                                                                                                ✔ 
[sudo] password for xxx: 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
:: Starting full system upgrade...
warning: haskell-filestore: unknown key 'it' in sync database
warning: haskell-filestore: unknown key 'ghc' in sync database
warning: haskell-filestore: unknown key 'mercurial' in sync database
error: could not parse package description file 'haskell-filestore-0.6.5-62/desc' from db 'extra'
error: failed to prepare transaction (invalid or corrupted database)

Suspecting AUR issue, I disabled AUR update in Pamac, and tried again:

Preparing...
Synchronizing package databases...
Refreshing core.db...
Refreshing extra.db...
Refreshing multilib.db...
Refreshing core.files...
Refreshing extra.files...
Refreshing multilib.files...
Failed to prepare transaction:
invalid or corrupted database

And in CLI,

sudo pacman -Syu                                                                                                                                                                       1 ✘  3s  
[sudo] password for xxx: 
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
:: Starting full system upgrade...
warning: haskell-filestore: unknown key 'it' in sync database
warning: haskell-filestore: unknown key 'ghc' in sync database
warning: haskell-filestore: unknown key 'mercurial' in sync database
error: could not parse package description file 'haskell-filestore-0.6.5-62/desc' from db 'extra'
error: failed to prepare transaction (invalid or corrupted database)

Any help is appreciated.

Try in terminal

sudo pacman -S archlinux-keyring manjaro-keyring

And you could also try refreshing your mirrors;

1 Like

Thanks!
This fixed my problem.

For my benefits of knowledge: is the issue caused by keyring corruption?

It is likely caused by not having updated in quite awhile and in the interim, one of archlinux-keyring or manjaro-keyring had an update.

That being said, you may have to properly deal with .pacnew files as well

https://wiki.archlinux.org/title/Pacman/Pacnew_and_Pacsave

1 Like

Actually, during running of the command, the output indicated that both my keyrings are up-to-date.
So I was really confused.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.