Hosed yum on Fedora 18 x86_64

Alan Evans alanwevans at gmail.com
Mon Aug 12 13:46:25 MDT 2013


I had something similar happen in the middle of a pre-upgrade so it was
even worse.  It took some time but I was able to sort it out.  I don't
recall the exact steps and they will vary anyway but here's the general
steps I took.

Make a backup of the RPM db just in case.
# tar czvf rpmdb.tar.gz /var/lib/rpm

Rebuild RPM db
# rpm --rebuilddb

In these kinds of situations I find incomplete transactions to be of little
use.  Sometimes they can help you by seeing what it was TRYING to do.  But
generally yum is unable to complete the transaction.

I've had cases where the interruption was in the middle of a package
upgrade so both the old and new version were installed and this confuses
yum to no end. I like to first make sure rpm and yum are happy.

# rpm -qa rpm\* | sort
# rpm -qa yum\* | sort

Look for duplicates. In particular:
rpm
rpm-libs
yum

If you find any 'rpm -e <the older package>'

The I like to make sure rpm and yum are updated.

# yum update rpm\* yum\* -y

Now try a full 'yum upgrade'  see if it can solve the dependencies.  If
not, some things to try.

Again look for duplicates.
# rpm -qa | sort

Try excluding things.
# yum update --exclude foo\*

If yum seems to be failing resolving some particular set of packages try to
work out those alone.  Maybe its a chicken/egg problem caused by the
transaction being interrupted and you will have to use yumdownloader like
you started to.
# yum update foo\*

Disable external repos.  If you have Livna and rpmforge* enabled you can
run into all kinds of problems.  Disable them with '--disablerepos livna*
--disablerepos rpmforge*' or edit /etc/yum.repos.d/.  Once you get the bulk
of the system updating again enable them one at a time.

See if there's anything you can remove.  I had MythTV installed and it was
available in two external repos with conflicting package names and
versions.  I found it was just easier to 'yum erase mythtv\*' then use
'package-cleanup --orphans' to find the remaining mythtv packages and
re-install later.

I also like 'yum shell', it lets you handle some interesting scenarios that
yum alone isn't smart enough to handle.  <side note>One of my pet peves was
that CentOS doesn't default to postfix but 'yum erase sendmail' causes
failed deps.  Ok so 'rpm -e sendmail --nodeps' I know in the end this is
safe but I fundamentally dislike '--nodeps'.  With 'yum shell' you can
'erase sendmail' then 'install postfix' then 'run' to run the transaction
and because the erasure of sendmail and install of postfix are all in one
transaction you don't get any dependency problems.</side note>  I have run
into scenarios when solving package problems where this helps also.
Something like:

> update
....
"un resolved dependency something"
> erase something-lib
> install lib-something
> run

Where yum is unable to figure out a dep but me w/ a bit of google-fu can.

HTH,
-Alan



On Mon, Aug 12, 2013 at 10:58 AM, Lance Grover <lance.grover at gmail.com>wrote:

> Did you try rebuilding the rpm database?  rpmdb --rebuilddb but look at all
> the options first.  Just a thought.
>
>
> On Mon, Aug 12, 2013 at 8:51 AM, Barry Roberts <blr at robertsr.us> wrote:
>
> > A few weeks ago we had a brief power outage here in Orem, and the one
> > computer in my house that's not on a UPS was in the middle of a big
> > 'yum upgrade'  Now lots of things are broken, and I can't get it
> > fixed, and I don't really want to re-format and re-install (so
> > Windowsy, ew), but that's about what I'm down to.
> >
> > 'yum-complete-transaction' would just hang and not do anything for
> > hours, so I finally ran it with '--cleanup-only'
> >
> > No Qt programs work because of incompatible library issues, but the
> > real problem is yum won't do anything because there are tons of
> > duplicates, or so it thinks.  If I try to 'package-cleanup
> > --clean-dupes'  it fails because it thinks it needs to remove systemd,
> > yum, and the kernel.  I've also done 'yum clean all' and tried to 'yum
> > history rollback' the botched transaction, but that fails also. I
> > don't remember the exact error.
> >
> > I tried to get yumdownloader to just download the latest rpms so I
> > could install them with 'rpm -Uvh --force', but yumdownloader fails
> > because of all the duplicates.
> >
> > I've exhausted my knowledge of yum/rpm and google.  Anybody got any
> > suggestions before backup, format, and re-install?
> >
> > Thanks,
> > Barry
> >
> > /*
> > PLUG: http://plug.org, #utah on irc.freenode.net
> > Unsubscribe: http://plug.org/mailman/options/plug
> > Don't fear the penguin.
> > */
> >
>
>
>
> --
> Thanks,
>
> Lance Grover
>
> http://www.groverfamily.org
>
> /*
> PLUG: http://plug.org, #utah on irc.freenode.net
> Unsubscribe: http://plug.org/mailman/options/plug
> Don't fear the penguin.
> */
>


More information about the PLUG mailing list