I recently tried to update my pacman files.
And I get prompt with “invalid or corrupted package”
But I do not know what file(s) have been corrupted.
I followed the guidelines of a previous forum post but I have gotten no change.
From trying to reset my mirrors, debug pacman, and clear my cache.
I have also lost my start menu (whiskers) from my taskbar as well as the function of my start menu button.
If anyone could point me in the right direction.
Currently running XFCE 5.9.16-1
While trying to update pacman here is the terminal.
Desktop]$ sudo pacman -Syu
[sudo] password for alek:
:: Synchronizing package databases…
core is up to date
extra is up to date
community is up to date
multilib is up to date
:: Starting full system upgrade…
error: could not open file /var/lib/pacman/local/libibus-1.5.23+3+gaa558de8-1/desc: No such file or directory
resolving dependencies…
looking for conflicting packages…
warning: could not fully load metadata for package libibus-1.5.23+3+gaa558de8-1
error: failed to prepare transaction (invalid or corrupted package)
NOTE: A user should not normally manually do anything in /var/lib/pacman/local. This is the meta data for the software installed on the system. There are 3 files in each directory (desc, files, mtree).
The archived manjaro entry below suggests that just touching/creating the file is enough. Check to see if the directory is there and which files are missing. It might be as simple as:
sudo -i
cd /var/lib/pacman/local/libibus-1.5.23+3+gaa558de8-1/
touch desc
Read the entry:
If that doesn’t work, try:
# Does the package exist in cache
ls -l /var/cache/pacman/pkg/libibus*
# If yes
# NOTE: it might not be, if you cleared this cache. There's a systemd timer that
# takes care of keeping 3 versions of a package by default.
pacman -U --dbonly /var/cache/pacman/pkg/libibus-1.5.23+3+gaa558de8-1-x86_64.pkg.tar.zst
#
pacman -Syyu
It can’t find any of the files with these commands
pacman -U --dbonly /var/cache/pacman/pkg/libibus-1.5.23+3+gaa558de8-1-x86_64.pkg.tar.zst
loading packages...
error: '/var/cache/pacman/pkg/libibus-1.5.23+3+gaa558de8-1-x86_64.pkg.tar.zst': could not find or read package
Must of removed the install cache located at /var/cache/pacman/pkg/. Should always try to keep the default of 3 versions. I don’t think the mirrors have this version, otherwise you could do a wget to fetch it.
Which error, the “could not load metadata” or “invalid or corrupted package”.
And on every file? Yikes!
Did something happen to /var/lib/pacman/local on your system? Then @FadeMind was right, find a way to restore (backup?) or rebuild it.
If you don’t have issues with booting your system then no, this is not what you need to do.
So please disregard the rest in that case.
As far as I can see, his information is incorrect anyway.
He did chroot into the system, but then proceeded to use /mnt/boot as the target directory.
From within chroot (where he is), that directory is not /mnt/boot but /boot - the parameter is not needed.
This would be the way to do it without chroot.
and
The command is now different - it’s manjaro-chroot now.
But I could be wrong.
I’d rather go with this information here - or look in the wiki how to chroot
If you don’t have issues with booting your system then no, this is not what you need to do.
So please disregard the rest in that case.
I now have the little problem that I don’t understand
why you would want to re-install the bootloader at all
when the problem that was so far talked about here isn’t at all about the system not booting.
It was you who suddenly brought that up.
I thought your issue was not being able to update.
re-installing grub will fix nothing in that regard
This is the error I get when trying to update or install from my pacman
and I tried this link (everything above nuclear option)
however I can’t get any commands to work, it needs pacman-key --init but I get this error every time.
[alek@Feather Desktop]$ sudo pacman-key --populate archlinux manjaro
==> ERROR: You do not have sufficient permissions to read the pacman keyring.
==> Use ‘pacman-key --init’ to correct the keyring permissions.
[alek@Feather Desktop]$ sudo pacman-key --init
gpg: symbol lookup error: gpg: undefined symbol: gpgrt_access, version GPG_ERROR_1.0
chmod: cannot access ‘/etc/pacman.d/gnupg//trustdb.gpg’: No such file or directory
gpg: symbol lookup error: gpg: undefined symbol: gpgrt_access, version GPG_ERROR_1.0
gpg: symbol lookup error: gpg: undefined symbol: gpgrt_access, version GPG_ERROR_1.0
gpg: symbol lookup error: gpg: undefined symbol: gpgrt_access, version GPG_ERROR_1.0
==> Updating trust database…
gpg: symbol lookup error: gpg: undefined symbol: gpgrt_access, version GPG_ERROR_1.0
==> ERROR: Trust database could not be updated.
No idea how something like that can even happen on it’s own.
Perhaps you added a custom repository to pacman?
anyway … This here - the posts by @linux-aarhus - should do the trick.
You need to be online during this procedure.
Summary of the steps, in order:
edit the file /etc/pacman.conf
sudo nano /etc/pacman.conf
find the line that says:
SigLevel = Required DatabaseOptional
and change that to:
SigLevel = Required DatabaseNever
mind the spelling! DatabaseNever
save the file
then - as he said in the next post:
Maybe I should have mentioned that I went through the whole #! bang - that is
remove the database files as root
(I have changed all the following commands to use sudo)
remove the database files
sudo rm -f /var/lib/pacman/sync/*
remove pacman pgp folder
sudo rm -rf /etc/pacman.d/gnupg
remove package cache
(perhaps you can skip this step, just this one step though, so you still have the package cache in case you need it)
Do not run this - you are using an EFI system as evident by the next part
The linked comment - was solving a completely different issue - but is usable when you start getting gpg related errors.
What is most important is that this whole topic is looking like an xyproblem where everyone is pouring water on fire - but not solving the initial cause - the little guy with the matches and a can of gasoline.
That error message is the only thing I can have a go on.
It is apparently related to the package libpgp-error
So - since you still have your pacman cache, try to reinstall it.
First, look whether it is there:
ls -al /var/cache/pacman/pkg/libgpg*
If it is, try installing it, using the actual filename that command just gave you: