1828202 Members
1895 Online
109975 Solutions
New Discussion

Re: rpm error...

 
K.C. Chan
Trusted Contributor

rpm error...

all,
I am getting an rpm error when trying to un-install a package on redhat advance server 4. Below is the error:
D: ========== --- MQSeriesClient-5.3.0-2 i386-Linux 0x0
D: erase: MQSeriesClient-5.3.0-2 has 17 files, test = 0
D: opening db index /var/lib/rpm/Name create mode=0x42
D: read h# 1399 Header sanity check: OK
D: opening db index /var/lib/rpm/Triggername create mode=0x42
D: erase: %preun(MQSeriesClient-5.3.0-2.i386) asynchronous scriptlet start
D: erase: %preun(MQSeriesClient-5.3.0-2.i386) execv(/bin/sh) pid 1302
D: erase: waitpid(1302) rc 1302 status ff00 secs 0.000
error: %preun(MQSeriesClient-5.3.0-2.i386) scriptlet failed, exit status 255

Any idea? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
8 REPLIES 8
xyko_1
Esteemed Contributor

Re: rpm error...

Hi KC,

Verify if there is any process running ownning some file that belongs to that software (MQSeries Client). May be that is the problem.

Regards,
Xyko
Stuart Browne
Honored Contributor

Re: rpm error...

xyko is precisely right:

D: erase: waitpid(1302) rc 1302 status ff00 secs 0.000

This is waiting for PID 1302 to finish up cleanly. For some reason, it fails, causing the error on the next line.

To find out what files are involved, use 'rpm -ql MQSeriesClient'.

If you want to find out what it's actually doing, you can issue 'rpm -q --scripts MQSeriesClient', under the PreUninstall and PostUninstall sections.

From there, stop any services or running programs that match the file list, and try removing the RPM again.

If it still fails, then try removing without running the scripts, then manually walking through the uninstall scripts (rpm -e --noscripts MQSeriesClient).
One long-haired git at your service...
K.C. Chan
Trusted Contributor

Re: rpm error...

guys, I am taking another tact to the problem. I am using squid to test out the issue; Can't touch MQ for the moment. So far anything with post and pre-install script is broken. For squid I am getting this:

error: %preun(squid-2.5.STABLE6-3.i386) scriptlet failed, exit status 255. which is the same error.

Taking your suggestion to see what is behind the hood, i dump out the script:

preuninstall scriptlet (using /bin/sh):

'if [ $1 = 0 ] ; then
service squid stop >/dev/null 2>&1
rm -f /var/log/squid/*
/sbin/chkconfig --del squid
fi
postuninstall scriptlet (using /bin/sh):
if [ "$1" -ge "1" ] ; then
service squid condrestart >/dev/null 2>&1
fi'

it is puking on "preuninstall scriptlet (using /bin/sh):". For some reasons it does not recognize that line. Any idea? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
Stuart Browne
Honored Contributor

Re: rpm error...

'/bin/sh' should be a symbolic link to 'bash'.

If it isn't, that will be causing some of your issues. Other than that though, that seems really odd.

I'd verify your RPM installations and ensure that you've not corrupted ('rpm -V ' is your friend) things or have a rootkit installed. (bad).
One long-haired git at your service...
Gopi Sekar
Honored Contributor

Re: rpm error...


I second stuart's word. check whether /bin/sh link exists and it points to /bin/bash.

second, try executing the specified preuninstall commands manually and see whether they are working as expected.

Regards,
Gopi
Never Never Never Giveup
K.C. Chan
Trusted Contributor

Re: rpm error...

I am thinking it's RPM. I am not sure how to interpret the result. Attached is the result of "-V". Also, I am getting these warning messages when runnin it:

prelink: /usr/lib/rpm/rpmdb_svc: at least one of file's dependencies has changed since prelinking
prelink: /usr/lib/rpm/rpmdb_verify: at least one of file's dependencies has changed since prelinking
prelink: /usr/lib/rpm/rpmi: at least one of file's dependencies has changed since prelinking
prelink: /usr/lib/rpm/rpmk: at least one of file's dependencies has changed since prelinking
prelink: /usr/lib/rpm/rpmq: at least one of file's dependencies has changed since prelinking

Any idea? Thanks.
Reputation of a thousand years can be determined by the conduct of an hour
K.C. Chan
Trusted Contributor

Re: rpm error...

BTW, /bin/sh is link to bash
Reputation of a thousand years can be determined by the conduct of an hour
Gopi Sekar
Honored Contributor

Re: rpm error...


if you feel this is rpm error then try upgrading rpm to a newer version. and/or try rebuilding rpm database by rpm --rebuilddb

i hope somebody else might have better solution to this.

Regards,
Gopi
Never Never Never Giveup