How do I find what dependencies a rpm file has?

RPM is a Package Manager for popular distribution such as Red Hat, Suse and many others. It is a powerful command line package management system for installing uninstalling, verifying, querying, and updating Linux computer software packages.

You can finding out what dependencies a rpm file has i.e. it will tell you what you need to install package with following command:
rpm -qpR {.rpm-file}
rpm -qR {package-name}

Find out what dependencies a uninstalled rpm file called mediawiki-1.4rc1-4.i586.rpm:
# rpm -qpR mediawiki-1.4rc1-4.i586.rpm

It will print list of dependencies on screen (output):


However RPM has in build mechanism to tell you about dependencies. Just try to install package and it will give you list of dependencies.
# rpm -ivh mediawiki-1.4rc1-4.i586.rpm


error: Failed dependencies:
   mod_php is needed by mediawiki-1.4rc1-4
   php-session is needed by mediawiki-1.4rc1-4
   php-gettext is needed by mediawiki-1.4rc1-4
   php-zlib is needed by mediawiki-1.4rc1-4
   php-mysql is needed by mediawiki-1.4rc1-4
   ImageMagick-Magick++ is needed by mediawiki-1.4rc1-4
   tetex is needed by mediawiki-1.4rc1-4
   cjk-latex is needed by mediawiki-1.4rc1-4


  • .rpm file: File with .RPM extension. Typically this file is not installed. It may be on CD or you just downloaded from Internet.
  • package-name: It is installed RPM file.

You can solve dependencies problem by installing each individual package(s). If you are using Red hat Linux then you can try this tip. If you are using Fedora core Linux then try yum. If you are using Suse linux then use Yast to install rpms.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 5 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
5 comments… add one
  • Hanh Nguyen Jul 31, 2007 @ 10:34

    First thanks for help ,i can’t install Python 2.3.4-2.aix5.1.ppc.rpm without error dependencies libcrypto.a,libgdbm.a,libssl.a ;
    any experiences in installing “AIX rpms” for this inconvenient? with –nodeps ???

  • Arshad Mar 6, 2011 @ 19:17


    I am not able to figure out what is going wrong here…can you guys..have a look..and give me feedback why these packages are not getting installed…

    I want…to install

    Rhel 5.4

    please help!!

    [root@applications Server]# rpm -Uvh elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
    error: Failed dependencies:
    elfutils-libelf-devel-i386 = 0.137-3.el5 is needed by elfutils-libelf-devel-static-0.137-3.el5.i386
    [root@applications Server]# rpm -Uvh elfutils-libelf-devel-0.137-3.el5.i386.rpm
    error: Failed dependencies:
    elfutils-libelf-devel-static-i386 = 0.137-3.el5 is needed by elfutils-libelf-devel-0.137-3.el5.i386
    [root@applications Server]# rpm -qpR elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
    elfutils-libelf-devel-i386 = 0.137-3.el5
    rpmlib(CompressedFileNames) <= 3.0.4-1
    rpmlib(PayloadFilesHavePrefix) <= 4.0-1
    rpmlib(VersionedDependencies) <= 3.0.3-1
    [root@applications Server]# rpm -qpR elfutils-libelf-devel-0.137-3.el5.i386.rpm
    elfutils-libelf-devel-static-i386 = 0.137-3.el5
    elfutils-libelf-i386 = 0.137-3.el5
    rpmlib(CompressedFileNames) <= 3.0.4-1
    rpmlib(PayloadFilesHavePrefix) <= 4.0-1
    rpmlib(VersionedDependencies) <= 3.0.3-1
    [root@applications Server]# apt-get install elfutils
    -bash: apt-get: command not found
    [root@applications Server]# rpm -aq|grep elfutils-libelf
    [root@applications Server]#


    • Raj Feb 23, 2015 @ 8:16
      # rpm -Uvh --repackage --nodeps elfutils-libelf-devel-static-0.137-3.el5.i386.rpm --test
      # rpm -Uvh --repackage --nodeps elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
  • Aymen Apr 14, 2014 @ 21:12

    hi ..
    I am trying to install oracle developer 6i on Linux 5 it’s my first time, found problem to install rpm ,
    had enough try with nothing , pls, could help me by steps i really need it.
    God bless all

  • aref ghobadi Aug 21, 2015 @ 14:25

    thanks a lot

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum