You are not logged in.

#1 2019-08-21 16:32:01

shevket
Member
Registered: 2017-07-19
Posts: 13

[SOLVED] Reinstall corrupted package

Hello,
I just recovered my system after the laptop shutdown while updating.
Everything looks almost fine after I ran `pacman -Syu` again in the arch-chroot.

My problem is that pacman complains about one package and
I would not like to do anything wrong with pacman again...

$ pacman -Dk mono
error: 'mono-5.20.1.19-1': description file is missing
error: 'mono-5.20.1.19-1': file list is missing

$ pacman -S mono
error: failed to open /var/lib/pacman/local/mono-5.20.1.19-1 
warning: metadata for package mono-xx could not be totally loaded
error: failed to prepare transaction (invalid or corrupted package)

$ pacman -Syu
... there is nothing to do

What is the right way to fix this? Thanks

Last edited by shevket (2019-08-21 19:18:50)

Offline

#2 2019-08-21 16:47:31

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,842
Website

Re: [SOLVED] Reinstall corrupted package

Try recreating the database entry for that package.

pacman -U --dbonly /var/cache/pacman/pkg/mono-5.20.1.19-1-x86_64.pkg.tar.xz

Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2019-08-21 18:39:53

shevket
Member
Registered: 2017-07-19
Posts: 13

Re: [SOLVED] Reinstall corrupted package

Hmm produces quite the same output as `pacman -Sy mono`

EDIT: I didn't do that

Last edited by shevket (2019-08-21 19:19:19)

Offline

#4 2019-08-21 18:44:50

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,842
Website

Re: [SOLVED] Reinstall corrupted package

In that case, manually remove what remains of the old database entry:

rm -r /var/lib/pacman/local/mono-5.20.1.19-1

Then recreate the database with pacman -U.

Also, once you've recreated the db entry, finish that upgrade.

pacman -Syu

Last edited by WorMzy (2019-08-21 18:45:32)


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2019-08-21 18:50:43

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Reinstall corrupted package

shevket wrote:

`pacman -Sy mono`

Don't do that: it breaks things.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#6 2019-08-21 18:55:39

shevket
Member
Registered: 2017-07-19
Posts: 13

Re: [SOLVED] Reinstall corrupted package

jasonwryan wrote:
shevket wrote:

`pacman -Sy mono`

Don't do that: it breaks things.

Sorry, that was a lapsus: `pacman -S mono`.
Exactly what I want to avoid

Offline

#7 2019-08-21 18:59:51

shevket
Member
Registered: 2017-07-19
Posts: 13

Re: [SOLVED] Reinstall corrupted package

WorMzy wrote:

Then recreate the database with pacman -U.

`pacman -U mono` yields

error: 'mono': could not find or read package 

Shouldn't I try `pacman -S mono` now instead?

Offline

#8 2019-08-21 19:02:30

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 11,842
Website

Re: [SOLVED] Reinstall corrupted package

No, I meant re-run

pacman -U --dbonly /var/cache/pacman/pkg/mono-5.20.1.19-1-x86_64.pkg.tar.xz

pacman -S will fail because you have untracked files that belong to the mono package.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#9 2019-08-21 19:18:06

shevket
Member
Registered: 2017-07-19
Posts: 13

Re: [SOLVED] Reinstall corrupted package

Ok thanks, this worked smile
Don't know why `pacman -Syu` produced a whole lot of warnings about older versions of mono... but all seems in order now

Cheers!

Last edited by shevket (2019-08-21 19:18:27)

Offline

Board footer

Powered by FluxBB