Llvm update fails

on trying to update my system i get the following report

pacman -S llvm
resolving dependencies…
looking for conflicting packages…
error: could not open file /var/lib/pacman/local/llvm-21.1.6-2/desc: No such file or directory
warning: could not fully load metadata for package llvm-21.1.6-2
error: failed to prepare transaction (invalid or corrupted package .
I noticed in the Arch Repo that version is flagged as out of date is there a fix or do i just block the upgrade untill a new version of llvm is released

This system is fully up to date and running ok apart from i HATE Wayland bring back Xorg

Pete

If it’s flagged out of date by Arch, then there’s no other option but to wait, but blocking the package is not necessary — actually, it’s pointless.

Except that it causes the complete update to fail it had to be blocked to allow the rest of the system update .
Pete

That was not the case for myself, and my system is fully updated.

Interesting i tried using the Manjaro package manager and pacman both threw an error i had to "–ignore=llvm " to get the update to run

Maybe you hadn’t updated your mirrors before running the update? :backhand_index_pointing_down:

sudo pacman-mirrors -f && sudo pacman -Syu
1 Like

In the extra repo llvm is at 21.1.8-1, so perhaps your system is not up-to-date. Have you tried sudo pacman -Syu llvm, or updating your mirrors (for instance, with sudo pacman-mirrors --fasttrack)?

2 Likes

i will check the mirrors again but the versions listed in the failure were correct .I will see how long it takes for llvm to be updated try again

I check for updates every day basically

Thanks
Pete

This suggests that you were trying to update from mirrors that had not sync’ed yet.

The golden rule is to always update your mirrors before updating your system.

1 Like

Hi Just tried updating the mirror list same response

:: Starting full system upgrade…
error: could not open file /var/lib/pacman/local/llvm-21.1.6-2/desc: No such file or directory
resolving dependencies…
looking for conflicting packages…
warning: could not fully load metadata for package llvm-21.1.6-2
error: failed to prepare transaction (invalid or corrupted package)

Pete

As @Phemisters said, the version in the repos is 21.1.8-1. So something is not quite right with your system.

Perhaps you are already blocking multiple packages in your /etc/pacman.conf, and one of them insists on llvm-21.1.6-2.

Let’s see the output… :backhand_index_pointing_down:

grep -E -i 'IgnorePkg|IgnoreGroup' /etc/pacman.conf

You need these metadata files for all your installed packages. Theses files are extremely important. If you lost one, it can indicate a Hardware failure. Without even one, pacman can not update a package.

To get the correct file back, delete /var/lib/pacman/local/llvm-21.1.6-2 and install the missing package version again with

pacman -U --dbonly /path/to/llvm-21.1.6-2-x86_64.pkg.tar.zst

it might be in your cache.
After this do the update with

pacman -Syu
1 Like

Something ain’t right there.

When I initiate an update (and add llvm to it),
it wants to download llvm-21.1.8-1

(I’m on stable)

1 Like

Why is nobody reading the error message?
The mentioned version number is not the version number the package will be updated to!

It is the version number that is currently installed. To update a package, pacman needs to read the metadata for the currently installed version. These metadata files are stored in /var/lib/pacman/local/. If these files are missing pacman will not update the packages. If the package is part of a larger update, the complete update will not start and will end with an error.

1 Like

Removing the package and reinstalling it would solve the problem. :backhand_index_pointing_down:

sudo pacman -Rdd llvm && sudo pacman -Syu llvm

I did not have llvm installed before - the file is not there when it’s not installed …
It will be, after installation.

… it now is (there)

version is:
llvm-21.1.8-1

You do have for every installed package a folder in /var/lib/pacman/local/ with the package name and version number. If a package gets updated, the files in theses folders get read in. If the folder or a file is missing the package can’t be updated. In the update process the old version folder is removed and the new version folder is created.

If you don’t have a specific package installed, you don’t have the folder. After the install, you will get the a folder but for the current version, not for an old version.

Another alternative is to create a placeholder file, just to satisfy pacman for the purposes of the upgrade.

sudo touch /var/lib/pacman/local/llvm-21.1.6-2/desc

Source:

3 Likes

This works, but can be dangerous. Because if you do it for a package that is needed by pacman, the update after the remove will not work.
For example, if you do it for curl this way, you would need to use a static pacman version to update.

But of course for this specific package, you can do it. Just be aware of the consequences by this approach.

That’s why I suggested it. It’s only required as a dependency of a dependency, and only for people using Plasma, or potentially, LXQt.

Either way, the OP never answered my question… :backhand_index_pointing_down:

There must be something very peculiar about that system to have ended up in a situation like this. :man_shrugging:

1 Like