Updating rpm

can alert you to these dependencies, it is unable to source additional packages. So no YUM will not allow you to install multiple versions. If you tell it a package that you want to update, it will attempt to do so, downloading all the necessary dependencies and installing them too.

Both tools can perform an install, and RPM will even allow you to install multiple versions simultaneously, but YUM will tell you that that package is already installed.

Simply including the new files in the deployment package will cause rpm conflicts.

I am looking for the proper way to use rpm to update/replace already installed files.

For example I have installed mysql and httpd, but when I'm trying to 'yum update' then yum throws error that package is available but not installed.

So, how can I update database of installed software? There's definitely a language barrier issue here -- the rest of this post is going to assume you installed My SQL and Apache through yum, not from source, and then yum update broke on you. If a package is available but cannot be installed, that usually means that one of its dependencies is faulty, which happens often if you have both the i386 and x86_64 versions of a package installed and you somehow end up with different versions.

Often happens when RPMs are carelessly slapped together by third parties. If the new version depends on updated versions of other stuff, the command will fail (obviously).

You might try "yum localinstall Virtual Box-..." (yum does first resolve dependencies, and gets whatever is needed).

This is a good tip but the rpmnew/rpmsave feature really refers to updating an existing package.

Of the options you list, I'd choose #1 as the least bad hack if the target systems are systems that I admin (as you say, it's more work but is the cleanest solution) and a combination of #2 and #4 (symlinks where possible, copies where not) if I'm creating the RPMs for others' systems (to avoid having to distribute a bunch of RPMs, but I'd make it very clear in the docs what I'm doing). These sections help with managing files among the versions.

You haven't described which files need to be updated or replaced and how they need to be updated. Keep track of what you're doing between versions and consider what one might do if they were to skip a version or two.

The package name is Virtual Box, so there is no mismatch there.

The error messages are really informative, though: The installation would replace a file that is needed for some other package (or belongs to another package).