You are not logged in.

#1 2017-03-31 11:52:07

zdvdcprz
Member
From: Leeds, UK
Registered: 2017-03-31
Posts: 17

[SOLVED] Ghostscript blocking pacman -Syu

Hi All,
I'm trying to update my system using pacman -Syu which fails with the following messages:-

[root@MAINPC dc]# pacman -Syu
:: Synchronising package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
error: could not open file /var/lib/pacman/local/ghostscript-9.20-4/desc: No such file or directory
:: Replace mate-desktop-schemas with community/mate-desktop? [Y/n] y
resolving dependencies...
looking for conflicting packages...
warning: could not fully load metadata for package ghostscript-9.20-4
error: failed to prepare transaction (invalid or corrupted package)

The directory /var/lib/pacman/local/ghostscript-9.20-4 contains only the mtree gzip archive. There are no 'desc' or 'files' scripts in there as there are with other packages. That explains the first error message at least.

pacman -R ghostscript complained about breaking dependencies elsewhere. Would a forced removal then reinstallation do the trick and maintain dependencies for other packges (gv, hplip & epson-inkjet-printer-escpr) ?

I've googled and searched the forums for an answer but haven't seen anything. Does anyone have an idea about how to fix this?

Cheers
DC

Last edited by zdvdcprz (2017-04-04 14:57:57)

Offline

#2 2017-03-31 12:05:24

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,892

Re: [SOLVED] Ghostscript blocking pacman -Syu

> error: failed to prepare transaction (invalid or corrupted package)

Your mirror list?

Offline

#3 2017-03-31 12:56:56

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,673
Website

Re: [SOLVED] Ghostscript blocking pacman -Syu

pacman -S --force ghostscript

Offline

#4 2017-03-31 13:08:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,892

Re: [SOLVED] Ghostscript blocking pacman -Syu

If the package is corrupt, forcing won't work ... hopefully ;-)

Offline

#5 2017-03-31 13:28:26

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,546
Website

Re: [SOLVED] Ghostscript blocking pacman -Syu

Seth, 2 points:

1) It's not the downloaded pkg.tar.xz that is a problem.  So redownloading, and/or checking another mirror isn't particularly relevant.  The missing file is from the local (e.g. currently installed) version.  This is to be replaced.  Replacing it should fix it, but pacman doesn't do this automatically because there is a problem.  So forcing this specific package in these circumstances makes sense.

2) See right under Allan's name: he's always right.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#6 2017-04-01 00:56:46

apg
Developer
Registered: 2012-11-10
Posts: 211

Re: [SOLVED] Ghostscript blocking pacman -Syu

Allan wrote:

pacman -S --force ghostscript

Trilby wrote:

Seth, 2 points:

1) It's not the downloaded pkg.tar.xz that is a problem.  So redownloading, and/or checking another mirror isn't particularly relevant.  The missing file is from the local (e.g. currently installed) version.  This is to be replaced.  Replacing it should fix it, but pacman doesn't do this automatically because there is a problem.  So forcing this specific package in these circumstances makes sense.

2) See right under Allan's name: he's always right.

--force won't do anything for the metadata error.  For that, you need to add empty 'files' and 'desc' files in /var/lib/pacman/local/ghostscript-9.20-4.  Then you can reinstall ghostscript 9.20-4 from your cache with --dbonly.

Offline

#7 2017-04-04 14:53:10

zdvdcprz
Member
From: Leeds, UK
Registered: 2017-03-31
Posts: 17

Re: [SOLVED] Ghostscript blocking pacman -Syu

Struth! Where did those four days go?

Thanks to everyone who took the trouble to post a reply - and apologies for the late response.

I followed AGP's advice and created empty 'files' and 'desc' files in /var/lib/pacman/local/ghostscript-9.20-4 using vi and followed this with pacman -Syu. The upgrade proceeded to retrieve all of the packages but then fell over when checking for file conflicts with the following messages

error: failed to commit transaction (conflicting files)
ghostscript: /usr/include/ghostscript/gdevdsp.h exists in filesystem
ghostscript: /usr/include/ghostscript/gserrors.h exists in filesystem
ghostscript: /usr/include/ghostscript/iapi.h exists in filesystem
ghostscript: /usr/include/ghostscript/ierrors.h exists in filesystem
ghostscript: /usr/share/licenses/ghostscript/LICENSE exists in filesystem
Errors occurred, no packages were upgraded.

After renaming those five files pacman -Syu seemed to work so I rebooted and tested ghostscript with GIMP and epdfview. [Fingers crossed I got that right...] Everything looked OK.

The problem is now fixed. Thanks, chaps.

Offline

Board footer

Powered by FluxBB