[CentOS] Broken upgrade to 5.2 {solved - I hope}

Ian Blackwell ian at ikel.id.au
Wed Jun 25 12:27:01 UTC 2008

Thanks to all that offered advice to help solve this for me.  Here's a 
round up for those that may follow in similarly ill-fated foot-steps.

1. Don't update/upgrade remotely without using "screen".  Dropping the 
ssh session caused yum to die inelegantly, with duplicate packages in 
the RPM database.
2. Analysing the output from
    /bin/rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' | sort
led me to erase almost 30 new packages that appeared to be duplicates of 
existing packages.  This wasn't without problems though, because I used 
this command:-
    yum erase libgcc-4.1.2-42.el5.i386
to remove the duplication noticed here:-
3. This broke the machine badly, and caused yum to stop working 
completely with missing libgcc_s.so.1 being reported as the cause.  This 
also effected other programs, e.g. man wasn't working either.  Anyway, 
long story short, I booted from the 5.1 DVD in rescue mode.  I was 
reluctant to reboot the box in a half upgraded state, but was forced 
into this due to the corrupt libgcc problem.  I then forced the 
reinstallation of libgcc-4.1.2-14.el5.i386 from the DVD using:-
    rpm -ivh --force --root /mnt/sysimage libgcc-4.1.2-14.el5.i386.rpm
This worked OK and the machine rebooted without a problem (what a relief).
4. Next I tried the yum -y upgrade process again (from the console this 
time), and to my enormous delight, it downloaded the packages I had 
removed earlier and then passed all transaction tests and started to 
process the 577 steps left to upgrade to 5.2.
5. I think there may still be some duplicates, which I'll check for 
after the upgrade has completed.  I didn't get all the way through my 
analysis of the duplicate package list because of the broken libgcc 
issue.  Having resolved this with the rescue boot, I took a punt on 
"having done enough" and restarted "yum upgrade".  Since it worked, I 
decided against interrupting it with the view to a subsequent 

All being well, I should have an upgraded machine fairly soon.

Thanks again for your prompt and enlightened assistance 8-)


More information about the CentOS mailing list