[Yum] how to handle missing dependencies?

Jim Perrin jperrin at gmail.com
Mon Jul 17 02:26:07 UTC 2006


On 7/16/06, Gary Funck <gary at intrepid.com> wrote:
>
> Update wants to update lm_sensors:
>
> # yum -C check-update
> lm_sensors.i386                          2.10.0-43.rhfc5.at     atrpms
> lm_sensors.x86_64                        2.10.0-43.rhfc5.at     atrpms
> lm_sensors-devel.x86_64                  2.10.0-43.rhfc5.at     atrpms
>
> But it can't:
>
> # yum -d 1 update
> Error: Missing Dependency: libsysfs.so.1 is needed by package lm_sensors

This is a failure of the repository maintainer to verify that his
packages are installable and play nicely in my opinion. Granted
conflicts are possible the more repos you use, but it seems every time
I hear about missing dependency problems or "yum ate my system" type
problems... that repository is ALWAYS involved.

> Question:  Is there a way to tell yum to update everything that
> it can, and to ignore those packages which can't be updated at the moment?
> I ask, because this update, which I don't care about right now, was holding
> up all other updates.  I worked around this by updating by hand and
> excluding
> the lm_sensors related packages.  I know that I can manually add lm_sensors
> in as an exclude in yum.conf, but that isn't really what I want to do,
> because
> eventually I may want to arrange to update the package, and don't want it
> to be silently forgotten for now.

Excluding those packages is really the only way to tell yum to ignore
them. Or you could use some of the yum plugins and other features to
limit those packages to a specific repository (may still cause some
breakage from missing deps).

> Back to resolving the dependency.  The FAQ:
> http://wiki.linux.duke.edu/YumFaq#Q6
> says:
>
> "One relatively easy way to fix this is to remove whatever package "needs"
> the packages that are about to be upgraded/obsoleted and then reinstall that
> package after you have upgraded everything else. In the example, remove
> junit, upgrade, then reinstall junit"
>
> ----
>
> Given my example, I presume that I need to arrange to remove lm_sensors
> along
> wiht the packages that depend upon it.
>
> Through trial and error, it seems this command will do the trick:
>
> # rpm -e --allmatches lm_sensors lm_sensors-devel net-snmp net-snmp-utils
> freeradius net-snmp-devel ethereal php-snmp freeradius-mysql

Some of those are core system packages and I'd be wary of replacing them.

> (Is there a script generally available that calculates the transitive
> closure needed when removing a particular package?  It would save a few
> steps.)

Beyond 'yum remove foo' ?

> That's a fairly long list of things, and I'm just a little worried that when
> I
> install the newer version of lm_sensors that some of these packages may
> not like the newer version.

That is a distinct possibility.

> Is it usually the case that they'll happily
> accept the newer version?

It *should* work, however see my previous comments about the stability
of the repository you reference.  I do not recommend the use of that
repository except under an extremely close eye (even then I'm
hesitant), and never actively enabled.

> I realize that the version of lm_sensors in this case is outside the FC5
> distribution, and is likely somewhat experimental.  For that reason, I'm
> not particularly keen to update it, but would like to understand the
> mechanics of resolving the dependencies, so am running the example by
> y'all.  Is this generally the approoach to follow?  Is there any way to
> tell yum just to ignore things it can't update?

Not that I'm aware of. It would seem to almost defeat the purpose,
however that's been discussed a couple times as I recall.

-- 
During times of universal deceit, telling the truth becomes a revolutionary act.
George Orwell



More information about the Yum mailing list