Manjaro is failing to update due to a missing file or folder

Here is the description of linux510-headers:

Repositorium             : core
Name                     : linux510-headers
Version                  : 5.10.23-1
Beschreibung             : Header files and scripts for building modules for
                           Linux510 kernel
Architektur              : x86_64
URL                      : http://www.kernel.org/
Lizenzen                 : GPL2
Gruppen                  : Nichts
Stellt bereit            : linux-headers=5.10.23
Hängt ab von             : gawk  python  libelf
Optionale Abhängigkeiten : Nichts
In Konflikt mit          : Nichts
Ersetzt                  : Nichts
Größe des Downloads      : 9,46 MiB
Installationsgröße       : 47,73 MiB
Packer                   : Helmut Stult <helmut@manjaro.org>
Erstellt am              : Do 11 Mär 2021 19:46:40 CET
Verifiziert durch        : MD5-Summe  SHA-256-Summe  Signatur

Try reinstalling it sudo pacman -S linux510-headers and see if the update goes through afterwards.

See this post from the archived Forum:

In your case the command to use in a terminal window is:

sudo touch /var/lib/pacman/local/linux510-headers-5.10.19-1/desc

After that proceed with the system update.

1 Like
sudo pacman -S linux510-headers
resolving dependencies...
looking for conflicting packages...
error: could not open file /var/lib/pacman/local/linux510-headers-5.10.19-1/files: No such file or directory
warning: could not fully load metadata for package linux510-headers-5.10.19-1
error: failed to prepare transaction (invalid or corrupted package)

I don’t know why its trying to update after im trying to install something

Do the same for this file too:

sudo touch /var/lib/pacman/local/linux510-headers-5.10.19-1/files

The same applies in case you get a similar error for the file /var/lib/pacman/local/linux510-headers-5.10.19-1/mtree (see the thread I linked in my previous post).

Then try to update your system again.

2 Likes

It was updating but then this happened:

error: failed to commit transaction (conflicting files)
linux510: /boot/linux510-x86_64.kver exists in filesystem
linux510: /usr/lib/modules/extramodules-5.10-MANJARO/version exists in filesystem
Errors occurred, no packages were upgraded.

Please read this:

3 Likes

Sorry for wasting your time but I’m still not sure what to do?

In a nutshell, what you will have to do is:

sudo pacman -S linux510-headers --overwrite '*'

After that, you can try the update again:

sudo pacman-mirrors --fasttrack && sudo pacman -Syyu

I think /boot/linux510-x86_64.kver belongs to the linux510 package, but I might be wrong. Maybe /usr/lib/modules/extramodules-5.10-MANJARO/version as well.

Indeed, it looks like @gnoblin_44 might have more errors in pacman database. So, it might make sense to let it overwrite all files:

sudo pacman-mirrors --fasttrack && sudo pacman -Syyu  --overwrite '*'

I never tried to force-overwrite a whole update, so I’m not sure if that’s recommendable…

Thank you for the response but after running the command you gave me, I tried to update the system again and it did this again

error: failed to commit transaction (conflicting files)
linux510: /boot/linux510-x86_64.kver exists in filesystem
linux510: /usr/lib/modules/extramodules-5.10-MANJARO/version exists in filesystem

Same with: sudo pacman -Syyu --overwrite '*'

I always have the worst luck when it comes to linux and programming, always takes me a long to set up or fix something

Strange as --overwrite '*' should, as it says, overwrite the offending files.
But as it looks like you have only two of them, just do

sudo rm /boot/linux510-x86_64.kver
sudo rm /usr/lib/modules/extramodules-5.10-MANJARO/version
sudo pacman -Syyu

Or before deleting files try:
sudo pacman -S linux510 --overwrite /usr/lib/modules/extramodules-5.10-MANJARO/version,/boot/linux510-x86_64.kver

This happened:

(1/1) checking keys in keyring                     [######################] 100%
(1/1) checking package integrity                   [######################] 100%
(1/1) loading package files                        [######################] 100%
(1/1) checking for file conflicts                  [######################] 100%
error: failed to commit transaction (conflicting files)
linux510: /boot/linux510-x86_64.kver exists in filesystem
linux510: /usr/lib/modules/extramodules-5.10-MANJARO/version exists in filesystem
Errors occurred, no packages were upgraded.

I’ll try tomorrow as its getting late where I am

After which command?

Your command

If you’re currently booted with 5.10 kernel I would not recommend deleting any files belonging to linux510 but boot into a different kernel first (if you’ve got one installed, that is).