Upgrading packages with rpm

James Wilkinson james at westexe.demon.co.uk
Wed Oct 13 12:33:55 UTC 2004


Matthew Saltzman wrote:
> libstdc++34 is designed to live side by side with libstdc++.  Install with
> "rpm -ivh ...".

John Hodges replied:
> Thank you. I managed to get everything installed properly using the -i
> flag. This does bring about another question, however. If they are
> intended to live side-by-side, why would -U try to replace one with the
> other? My apologies if it seems I am splitting hairs, but I am quite new
> to linux and when a command does not act as I would have anticipated, I
> like to understand why.

That's what it's designed to do.

rpm -i tries to install a package.

rpm -F tries to update a package that is already installed (and won't do
anything if the package isn't installed: that means you can rpm -F *.rpm
on a directory of rpms, some of which you have installed, and some of
which have been updated. RPM will only update the ones that you have
installed already and that have newer versions).

rpm -U is a mixture: it will update if it can (if the package is already
there), and install if it can't.

Normally, however, a new version of a package will replace files owned
by the old package: rpm will detect that, and won't let you install them
side by side. If you want the new package, you have to use -F or -U,
which will replace the old package.

Some packages, like this one and the kernel packages, are designed so
you can have multiple versions installed. But -F and -U will *still*
replace the old version, because that's what they do.

It's just that RPM will detect that nothing in the new package will
overwrite anything in the old package, and will therefore let -i
succeed.

Hope this helps,

James.

-- 
E-mail address: james | Hooray. "I'm Sorry I Haven't A Clue" is back on,
@westexe.demon.co.uk  | complete with strip poker. Yes, this is on the radio.
                      | ("Erm..  five queens", "Barry, you're playing with
                      | postage stamps", "Oh.") -- Telsa Gwynne




More information about the fedora-list mailing list