Pages

Tuesday, August 9, 2016

Check dependencies of local RPM package

We all know that for managing packages or softwares on any system, we need some kind of tool which can be used to manage the packages or softwares. Different distributions have its know tool for achieving the same.

                     For example for RHEL/Centos/Fedora we use RPM(RPM Package Manager)
 for all rpm package management which take care of "installation, uninstallation, update, query etc.



              So, sometimes whenever we install any package we get lots of error regarding the dependencies. Here we are discussing that how we can list dependencies associated with particular rpm file.


1.) Check for file i,e, yet package is not installed:
         rpm -qpR {rpm-file}  
e.g. test
    -----
    -----
    output truncated..
  2.) If packages is already installed:
      rpm -qR {package-name}
e.g. :

   3.) Dry run without installing the package:
         rpm -Uvh --test {rpm-file}
  e.g.:

Finally, yes of course if you don't make these checks and just try to install then you will get list of missing dependencies as well.