You are not logged in.

#1 2016-12-10 20:59:10

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

[Solved] "Load metadata for package" errors

I have been having some strange gcc compile messages while attempting to install AUR packages. Some searching here suggested trying to reinstall glibc (OK) and gcc. However, on reinstalling gcc I get these messages:

error: could not open file /var/lib/pacman/local/gcc-6.2.1-1/files: No such file or directory
warning: could not fully load metadata for package gcc-6.2.1-1
error: failed to prepare transaction (invalid or corrupted package)

Any ideas on how to deal with those would be appreciated.

Last edited by lagagnon (2016-12-12 03:18:50)


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#2 2016-12-12 00:49:58

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] "Load metadata for package" errors

Your pacman database is corrupted and doesn't know what files exist in the gcc package. This may be indicative of other problems as well. e.g. has your computer ever crashed during an update?

You can force reinstall gcc (`pacman -S --force gcc`) to ignore that error and recreate the metadata for the gcc package. Before you do that, you might want to check the database for other errors (`pacman -Qkk`).


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2016-12-12 02:29:24

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: [Solved] "Load metadata for package" errors

Thanks for that, but even using force I still get errors:

sudo pacman -S --force gcc
warning: gcc-6.2.1-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...
error: could not open file /var/lib/pacman/local/gcc-6.2.1-1/files: No such file or directory
warning: could not fully load metadata for package gcc-6.2.1-1
error: failed to prepare transaction (invalid or corrupted package)

Also, I tried removing part packages with the following code, but no luck again -same errors as above:

find /var/cache/pacman/pkg/ -iname "*.part" -exec rm {} \;

Last edited by lagagnon (2016-12-12 02:31:21)


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#4 2016-12-12 02:42:26

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [Solved] "Load metadata for package" errors

The missing file is part of the pacman "installed packages" database, so the *.pkg.tar.xz files don't matter.

I am not accustomed to dealing with broken databases (fortunately big_smile), so I may have been mistaken in thinking that --force will override the broken local database error. So try deleting the broken directory '/var/lib/pacman/local/gcc-6.2.1-1/' and then force-reinstalling the package (you will likely have at least some files from it, so if you don't force the package it will mistakenly error on all those orphaned gcc files).

Last edited by eschwartz (2016-12-12 02:43:16)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2016-12-12 03:15:30

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,541

Re: [Solved] "Load metadata for package" errors

Simplest thing to do would be to create that file as an empty text file, then force reinstall.

Online

#6 2016-12-12 03:18:29

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: [Solved] "Load metadata for package" errors

Thanks Eschwartz - that fixed it.


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

Board footer

Powered by FluxBB