Errors trying to upgrade system

I tried to run sudo pacman -Syu after updating my system. Last update was performed on October 13. Looking at the Stable announcements, I was under the impression that I had all major updates installed. Unfortunately today I am receiving the following errors:

sudo pacman -Syu
:: Synchronizing package databases...
 core                  141.5 KiB   990 KiB/s 00:00 [----------------------] 100%
 extra                   8.0 MiB  18.7 MiB/s 00:00 [----------------------] 100%
 multilib              143.9 KiB  1007 KiB/s 00:00 [----------------------] 100%
:: Starting full system upgrade...
warning: python-pytest-xdist: unknown key '1724687091' in sync database
warning: python-pytest-xdist: unknown key '%CHECKDEPexecnet' in sync database
error: could not parse package description file 'python-pytest-xdist-3.5.0-2/desc' from db 'extra'
error: failed to prepare transaction (invalid or corrupted database)

Note that I ran sudo pacman-mirrors -f 0 followed by sudo pacman -Syyu first thing.

What can I do from here? I understand we shouldnā€™t delay maintenance but I am completely lost right now.

Appreciate everyoneā€™s responses.

Edit:

you can try to force refresh a redownload of all databases thru sudo pacman -Syy and also check potential keyring issues: pacman/Package signing - ArchWiki

1 Like

Your problem may be similar to another reported recently where the solution was to refresh mirrors - have you tried that?

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

As a last resort, and assuming no keyring issues (as mentioned above) you might also try:

sudo rm -f /var/lib/pacman/sync/*
sudo pacman -Syu

Yes, the first command I ran was sudo pacman-mirrors -f 0 before attempting sudo pacman -Syyu. I will try some of the other suggestions and will report back.

This did the trick!

I thought sudo pacman -Syyu should have done what sudo pacman -Syy did except without issuing the update. How are they different?

You have that right.
Syyu is Syy but the ā€˜upgradeā€™ part runs after the forced refresh.
Unless doing something very specific, the u should be included any time a y (or yy) is issued.

Iā€™d have left out the number (to fall back on the default)
or have at least asked for one (1)

With zero as the number, you have effectively asked to generate an empty list of mirrors ā€¦

-f, --fasttrack [NUMBER]
                        Generate mirrorlist with a number of up-to-date mirrors.

Leaving out the number is the same as 0 which is the same as ā€˜allā€™.
(if you already have a custom mirror list, such as by region or protocol, then it is ā€˜allā€™ of those)

I usually use and suggest -f (no number) for all those reasons, unless we know we want to break an existing pool, and because its the shortest variant to type.

zero means all - hmm
ā€¦ thatā€™s not really intuitive, Iā€™d even say: counterintuitive :man_shrugging:

Its not unique to pacman-mirrors.

It makes sense that ā€˜no inputā€™ might equal ā€˜no integer distinctionā€™ (so, if not exactly 6 from a group ā€¦ all from group).

If you see it as -f optionally takes a numeric argument if you wish to limit the number of produced mirrors ā€¦ then you can likewise see the 0 (or no input) as no limit.

Then again ā€¦ that doesnt mean it cant be ā€˜counterintuitiveā€™.
I may include that intuitiveness can be subjective.

That makes sense.

This may be logical, but not intuitive.

If I read the help for the command, the number denotes the number of up to date mirrors I want.
I would not easily come to the conclusion that ā€œ7ā€ produces a list of seven,ā€œ5ā€ produces a list of five, ā€œ2ā€ produces a list of two, but 0 ā€¦ doesnā€™t follow that pattern.

It just looked strange to me and I have never seen it written this way (with a zero).

Of course.

By now Iā€™m sorry that I started this tangent.

1 Like

No need to be sorry.

I just wanted to bring some clarity.

It wasnā€™t even that long of a detour. :slight_smile:

Thatā€™s what I had in mind.

But I had to run -Syy in order for -Syu to work as -Syyu alone yielded the same errors.

So unless -Syyu doesnā€™t do what I think it does? Bit confused here.

This would strike me as odd.
In your examples you only showed the one y (pacman -Syu)

Really doing pacman -Syyu should be identical to pacman -Syy && pacman -Su aside from the few seconds difference in between the upgrade portion. It would likewise be the same as pacman -Syy && pacman -Syu excepting the minute chance that a refresh was somehow required again in between ( that is some difference in the mirror found in the moments between -Syy and -Syu necessitating another refresh and it picked up by the single y on the second operation ).

If it is as you say then I dont really have an answer. I guess I would like to see the logs of it.

From pacman.log (first logged command to successful command):

[2024-11-02T22:30:39-0400] [PACMAN] Running 'pacman -Syyu'
[2024-11-02T22:30:39-0400] [PACMAN] synchronizing package lists
[2024-11-02T22:30:40-0400] [PACMAN] starting full system upgrade
[2024-11-02T22:30:48-0400] [PACMAN] Running 'pacman -Syu'
[2024-11-02T22:30:48-0400] [PACMAN] synchronizing package lists
[2024-11-02T22:30:49-0400] [PACMAN] starting full system upgrade
[2024-11-02T22:31:47-0400] [PACMAN] Running 'pacman -Syu'
[2024-11-02T22:31:47-0400] [PACMAN] synchronizing package lists
[2024-11-02T22:31:48-0400] [PACMAN] starting full system upgrade
[2024-11-02T22:31:51-0400] [PACMAN] Running 'pacman -Syyu'
[2024-11-02T22:31:51-0400] [PACMAN] synchronizing package lists
[2024-11-02T22:31:51-0400] [PACMAN] starting full system upgrade
[2024-11-02T22:45:29-0400] [PACMAN] Running 'pacman -Syu'
[2024-11-02T22:45:29-0400] [PACMAN] synchronizing package lists
[2024-11-02T22:45:29-0400] [PACMAN] starting full system upgrade
[2024-11-03T12:55:03-0500] [PACMAN] Running 'pacman -Syu'
[2024-11-03T12:55:03-0500] [PACMAN] synchronizing package lists
[2024-11-03T12:55:04-0500] [PACMAN] starting full system upgrade
[2024-11-03T12:55:14-0500] [PACMAN] Running 'pacman -Syy'
[2024-11-03T12:55:14-0500] [PACMAN] synchronizing package lists
[2024-11-03T12:55:19-0500] [PACMAN] Running 'pacman -Syu'
[2024-11-03T12:55:19-0500] [PACMAN] synchronizing package lists
[2024-11-03T12:55:19-0500] [PACMAN] starting full system upgrade
[2024-11-03T12:55:35-0500] [PACMAN] Running 'pacman -Syyu'
[2024-11-03T12:55:35-0500] [PACMAN] synchronizing package lists
[2024-11-03T12:55:37-0500] [PACMAN] starting full system upgrade
[2024-11-03T12:56:26-0500] [ALPM] running '00-timeshift-autosnap.hook'...
[2024-11-03T12:56:26-0500] [ALPM-SCRIPTLET] ==> skipping timeshift-autosnap due skipRsyncAutosnap in /etc/timeshift-autosnap.conf set to TRUE.
[2024-11-03T12:56:26-0500] [ALPM] transaction started
[2024-11-03T12:56:26-0500] [ALPM] upgraded curl (8.10.1-1 -> 8.10.1-1.0)
[2024-11-03T12:56:27-0500] [ALPM] upgraded brave-browser (1.70.126-1 -> 1.71.121-1)
[2024-11-03T12:56:27-0500] [ALPM] upgraded inxi (3.3.36.1-1 -> 3.3.36.1-2)
[2024-11-03T12:56:27-0500] [ALPM] upgraded pacui (1.14+74+gb1f2239-1 -> 1.14+83+ge16353e-1)
[2024-11-03T12:56:28-0500] [ALPM] upgraded signal-desktop (7.28.0-1 -> 7.31.0-1)
[2024-11-03T12:56:29-0500] [ALPM] upgraded thunderbird (128.3.1-1 -> 128.4.0-1)
[2024-11-03T12:56:29-0500] [ALPM] upgraded xorg-server-common (21.1.13-1 -> 21.1.14-0)
[2024-11-03T12:56:29-0500] [ALPM] upgraded xorg-server (21.1.13-1 -> 21.1.14-0)
[2024-11-03T12:56:29-0500] [ALPM] upgraded xorg-xwayland (24.1.2-1 -> 24.1.4-0)
[2024-11-03T12:56:29-0500] [ALPM] transaction completed
[2024-11-03T12:56:29-0500] [ALPM] running '30-systemd-update.hook'...
[2024-11-03T12:56:29-0500] [ALPM] running 'gtk-update-icon-cache.hook'...
[2024-11-03T12:56:30-0500] [ALPM] running 'update-desktop-database.hook'...

The first command I ran was sudo pacman-mirrors -f 0 followed by what the logs show.

Not sure how helpful these would be :person_shrugging:.

Just mentioning that pacman-mirrors does not necessarily guarantee that your mirrors will be up to date, especially if you happen to have a custom mirror pool with relatively few mirrors.

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