Hi there, sorry to post about this recurring issue, but I’ve tried other forum fixes and they helped and made things worse, I think.
To give the full story: at some point my Add/Remove Software app broke. Whenever I tried to update I would get the error message “Failure to prepare transaction” with an additional “invalid or corrupted database”. I found this post, went into Konsole, and entered:
sudo rm -R /var/lib/pacman/sync
sudo -E pacman -Syu
This seemed to update my apps, and I thought everything was fixed. However, when I went back into Add/Remove Software, I could no longer download or update anything. In addition to the original error messages, I now get “target not found: appname” for new apps I’m trying to download. It’s like I have a database filled with broken links.
This is a bit of a nightmare for me, as I use this laptop for work, and I have a new semester coming up soon. I’m new to Linux but trying my hardest to understand. I’ve picked up that there seem to be two updaters: pamac and pacman? One is for AUR and the other for Arch distributions?
I also have this output, from a different fix I tried earlier (that resulted in the same errors, unfortunately).
pamac update --force-refresh
> Synchronizing package databases...
> Error: GPGME error: No data
> Error: GPGME error: No data
> Error: GPGME error: No data
> Refreshing core.db...
> Refreshing extra.db...
> Refreshing multilib.db...
> Error: GPGME error: No data
> Error: GPGME error: No data
> Error: GPGME error: No data
> invalid or corrupted database (PGP signature)
> Error: GPGME error: No data
> Error: GPGME error: No data
> Error: GPGME error: No data
> Refreshing core.files...
> Refreshing extra.files...
> Refreshing multilib.files...
> Error: GPGME error: No data
> Error: GPGME error: No data
> Error: GPGME error: No data
> invalid or corrupted database (PGP signature)
> Failed to synchronize databases
> Refreshing AUR...
> cp: cannot access '/var/lib/pacman/sync/download-b4DkJF': Permission denied
> Nothing to do.
> Cloning ckbcomp build files...
> Generating ckbcomp information...
> Checking ckbcomp dependencies...
> Cloning pamac-tray-icon-plasma build files...
> Generating pamac-tray-icon-plasma information...
> Checking pamac-tray-icon-plasma dependencies...
> Cloning onlyoffice-bin build files...
> Generating onlyoffice-bin information...
> Checking onlyoffice-bin dependencies...
> cp: cannot access '/var/lib/pacman/sync/download-b4DkJF': Permission denied
> cp: cannot access '/var/lib/pacman/sync/download-BodkOq': Permission denied
> Error: Failed to prepare transaction: invalid or corrupted database