-1

Someone was performing an upgrade of a software running on our RHEL Server with rpm -Uvh package_name.rpm

I'd like to use yum -U package_name.rpm

Can this cause any problem or inconsistency?

  • 1
    You might get better results using "yum install" for the package-files. It will do an update as needed. – Thomas Dickey Jan 2 at 10:18
3

If you just want to update specific packages with yum then the correct command is:

yum update package.rpm

Of course, an important thing to note is exactly how the packages were installed and whether or not there are updates in the repos that yum will use. If you can't confirm that the --nodeps switch wasn't used then you may run into dependency issues at runtime when using the packages.

A better thing to do is to just use yum to install the packages as it will pull the latest version along with dependencies.

  • Thank you but I'm a bit puzzled. I think RPM does not resolve dependencies (it only reports them) so if there weren't any why would / could I possibly run into dependency issues? Could you please elaborate ? – blabla_trace Jan 3 at 8:04
  • 1
    @blablatrace What I'm saying is that whoever was doing the upgrades could have used the --nodeps switch with rpm and missed dependencies. Using yum will pull the dependencies as necessary. I've updated my answer to be more clear. – Nasir Riley Jan 3 at 8:08
  • Thank you again. So with the --nodeps options the warning aout dependencies is not even logged and rpm continues to install the given rpm package, yes? – blabla_trace Jan 3 at 9:44
  • 1
    @blablatrace As rpm doesn't even keep a log for installation actions, that is correct. The only way to know if it was performed with the --nodeps switch and the dependencies weren't installed is if they error at runtime regarding missing libraries. Personally, I don't know why whomever installed them chose to use rpm instead of yum because it would have been necessary to download and install them in the correct order one by one to avoid dependency issues. That's why it's better to use yum to install software. – Nasir Riley Jan 4 at 4:13
2

no, yum uses rpm underneath. The only important difference is that yum knows about repositories and can thus - if needed - decide to fetch packages from those repositories to install. rpm does not, and will thus only install what you provide him.

Note: the yum syntax is different from rpm:

  • to install a new package, use yum install package
  • to update a package to a new version; use yum update package
  • to update all packages; use yum update

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.