[CentOS] yum hangs and results in problems

Gary Stainburn gary at ringways.co.uk
Tue May 29 08:17:37 UTC 2018


On Friday 25 May 2018 07:57:16 John Hodrien wrote:
> On Thu, 24 May 2018, Gary Stainburn wrote:
> > Questions
> >
> > 1) Any ideas why my yum runs keep hanging, and what I can do to fix it?
>
> It's likely it's hanging in a script, so just trace it all through.  yum
> will start other processes up, and one of those will have hung.  It'll be
> called /tmp/rpm-script.XXXX or similar, I forget.
>
> Killing that process doesn't cause the world to end, and  you can debug
> what failed there later by taking a note of the rpm that's being updated,
> and looking at the script later.
>
> > 2) How do I go about fixing the problems listed above?
>
> Don't kill yum in the middle of a run if you can possibly avoid it.
>
> I always favour "package-cleanup --cleandupes --removenewestdupes"
>
> But right now, the problem is you're part way between updated and not.
>
> You can be more brutal than package-cleanup or yum are willing to be.
>
> You can fix this with yum shell, telling it what you're going to remove and
> what you're going to add to put it back in a consistent state.  That's
> probably the best way of doing it.
>
> The more manual way is for each of those listed, use rpm to see what's
> really installed.  If you've got a duplicate, aim to remove the newest
> package.  If it says it's not possible, look what you need to do to make it
> consistent, and use --nodeps if necessary.  Then do a yum upgrade when
> you're done.
>
> Yours doesn't look that bad.
>
> jh

Thanks for the advice John, but for some reason, the post took 18 hours to 
appear on the list, by which time my server was well and truely FUBAR'd. 

There followed a lovely (long) night while I built a brand new mail server - 
thankfully I had a clean Centos7 box waiting which saved a couple of hours, 
but it still made for a 20 1/2 hour day by the time I'd finished.

Much of this time was trying to fix the problem in my other post.



More information about the CentOS mailing list