PDA

View Full Version : Unable to erase an old package.


dd_wizard
16th September 2010, 07:21 PM
Any ideas how to overcome this error?

[gene@Mobile-PC ~]$ yum list installed gpm*
...
Installed Packages
gpm.x86_64 1.20.6-10.fc14 @updates-testing
gpm.x86_64 1.20.6-11.fc14 @fedora
gpm-devel.x86_64 1.20.6-11.fc14 @fedora
gpm-libs.x86_64 1.20.6-11.fc14 @updates-testing

[gene@Mobile-PC ~]$ sudo rpm --erase --verbose gpm-1.20.6-10.fc14.x86_64
/var/tmp/rpm-tmp.t4Fzm1: line 8: syntax error: unexpected end of file
error: %preun(gpm-1.20.6-10.fc14.x86_64) scriptlet failed, exit status 2

Thanks,
dd_wizard

---------- Post added at 11:21 AM CDT ---------- Previous post was at 10:51 AM CDT ----------

Here's a little more info. I downgraded gpm* to 1.20.6-10.fc14, then reinstalled the stuck package just to be sure. Then I did an update and got this:

Running Transaction
Updating : gpm-libs-1.20.6-11.fc14.x86_64 1/6
Updating : gpm-1.20.6-11.fc14.x86_64 2/6
Updating : gpm-devel-1.20.6-11.fc14.x86_64 3/6
Cleanup : gpm-devel-1.20.6-10.fc14.x86_64 4/6
Error in PREUN scriptlet in rpm package gpm
Cleanup : gpm-libs-1.20.6-10.fc14.x86_64 5/6
/var/tmp/rpm-tmp.PzTbRt: line 8: syntax error: unexpected end of file
error: %preun(gpm-1.20.6-10.fc14.x86_64) scriptlet failed, exit status 2
gpm-1.20.6-10.fc14.x86_64 was supposed to be removed but is not!

Looking at yum history shows this from the original update to 1.20.6-11:

49 /var/tmp/rpm-tmp.hk0inP: line 8: syntax error: unexpected end of file
50 error: %preun(gpm-1.20.6-10.fc14.x86_64) scriptlet failed, exit status 2
history info

So this package was never cleaned up, even after the original update. :confused:

Was that update broken for anybody else? If you want to check, the following commands will be useful:

yum list installed gpm*

yum history list gpm-1.20.6-11*

yum history info nnn
where nnn is the transaction number from the previous command

Thanks again,
dd_wizard

PabloTwo
16th September 2010, 07:55 PM
You could try,

sudo rpm --erase --noscripts --verbose gpm-1.20.6-10.fc14.x86_64

dd_wizard
16th September 2010, 08:02 PM

Thanks PabloTwo, that worked. I haven't used the --noscripts option before.

dd_wizard