20

I'm going to install an RPM package and I can see that some of dependencies requires X server libraries to be installed as well. I'm absolutely sure that the package I need is a server software and does not need X server.

I wonder if there is a way to print a list of RPM dependencies like it's done in Gentoo Linux?

   enter image description here

This command prints first level dependencies only, so it does not suit me:

$ yum deplist <package name>

2 Answers 2

32

In RHEL6 there is command repoquery from yum-utils package. It can do this:

# repoquery --tree-requires bash
bash-4.1.2-15.el6_4.x86_64 [cmd line]
 \_  glibc-2.12-1.132.el6_5.4.i686 [1: rtld(GNU_HASH)]
 |   \_  basesystem-10.0-4.el6.noarch [1: basesystem]
 |   |   \_  filesystem-2.4.30-3.el6.x86_64 [1: filesystem]
 |   |   |   \_  setup-2.8.14-20.el6_4.1.noarch [1: setup >= 2.5.4-1]
 |   |   \_  setup-2.8.14-20.el6_4.1.noarch [1: setup]
 |   \_  glibc-common-2.12-1.132.el6_5.4.x86_64 [1: glibc-common = 2.12-1.132.el6_5.4]
 |   |   \_  bash-4.1.2-15.el6_4.x86_64 [2: /bin/bash, /bin/sh]
 |   |   |   \_  glibc-2.12-1.132.el6_5.4.i686 [1: rtld(GNU_HASH)]
 |   |   |   \_  glibc-2.12-1.132.el6_5.4.x86_64 [4: libc.so.6(GLIBC_2.4)(64bit), libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit), rtld(GNU_HASH)]
 |   |   |   \_  ncurses-libs-5.7-3.20090208.el6.i686 [1: ncurses-libs]
 |   |   |   \_  ncurses-libs-5.7-3.20090208.el6.x86_64 [2: libtinfo.so.5()(64bit), ncurses-libs]
 |   |   \_  glibc-2.12-1.132.el6_5.4.i686 [1: glibc = 2.12-1.132.el6_5.4]
 |   |   \_  glibc-2.12-1.132.el6_5.4.x86_64 [4: glibc = 2.12-1.132.el6_5.4, libc.so.6(GLIBC_2.3)(64bit), libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit)]
 |   |   \_  libcap-2.16-5.5.el6.x86_64 [1: libcap.so.2()(64bit)]
 |   |   |   \_  glibc-2.12-1.132.el6_5.4.i686 [2: /sbin/ldconfig, rtld(GNU_HASH)]
 |   |   |   \_  glibc-2.12-1.132.el6_5.4.x86_64 [3: /sbin/ldconfig, libc.so.6(GLIBC_2.3.3)(64bit), rtld(GNU_HASH)]
 |   |   |   \_  libattr-2.4.44-7.el6.x86_64 [2: libattr.so.1()(64bit), libattr.so.1(ATTR_1.0)(64bit)]
 |   |   |   |   \_  glibc-2.12-1.132.el6_5.4.i686 [2: /sbin/ldconfig, rtld(GNU_HASH)]
 |   |   |   |   \_  glibc-2.12-1.132.el6_5.4.x86_64 [3: /sbin/ldconfig, libc.so.6(GLIBC_2.4)(64bit), rtld(GNU_HASH)]
 |   |   \_  tzdata-2014e-1.el6.noarch [1: tzdata >= 2003a]
 |   \_  libgcc-4.4.7-4.el6.i686 [1: libgcc]
 |   \_  libgcc-4.4.7-4.el6.x86_64 [1: libgcc]
 |   \_  nss-softokn-freebl-3.14.3-10.el6_5.i686 [2: libfreebl3.so, libfreebl3.so(NSSRAWHASH_3.12.3)]
 |   |   \_  glibc-2.12-1.132.el6_5.4.i686 [5: libc.so.6(GLIBC_2.7), libdl.so.2, libdl.so.2(GLIBC_2.0), libdl.so.2(GLIBC_2.1), rtld(GNU_HASH)]
 |   |   \_  glibc-2.12-1.132.el6_5.4.x86_64 [1: rtld(GNU_HASH)]
 \_  glibc-2.12-1.132.el6_5.4.x86_64 [4: libc.so.6(GLIBC_2.4)(64bit), libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit), rtld(GNU_HASH)]
 |   \_  basesystem-10.0-4.el6.noarch [1: basesystem]
 |   \_  glibc-common-2.12-1.132.el6_5.4.x86_64 [1: glibc-common = 2.12-1.132.el6_5.4]
 |   \_  libgcc-4.4.7-4.el6.i686 [1: libgcc]
 |   \_  libgcc-4.4.7-4.el6.x86_64 [1: libgcc]
 |   \_  nss-softokn-freebl-3.14.3-10.el6_5.x86_64 [2: libfreebl3.so()(64bit), libfreebl3.so(NSSRAWHASH_3.12.3)(64bit)]
 |   |   \_  glibc-2.12-1.132.el6_5.4.i686 [1: rtld(GNU_HASH)]
 |   |   \_  glibc-2.12-1.132.el6_5.4.x86_64 [4: libc.so.6(GLIBC_2.7)(64bit), libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit), rtld(GNU_HASH)]
 \_  ncurses-libs-5.7-3.20090208.el6.i686 [1: ncurses-libs]
 |   \_  glibc-2.12-1.132.el6_5.4.i686 [6: /sbin/ldconfig, libc.so.6(GLIBC_2.4), libdl.so.2, libdl.so.2(GLIBC_2.0), libdl.so.2(GLIBC_2.1), rtld(GNU_HASH)]
 |   \_  glibc-2.12-1.132.el6_5.4.x86_64 [2: /sbin/ldconfig, rtld(GNU_HASH)]
 |   \_  ncurses-base-5.7-3.20090208.el6.x86_64 [1: ncurses-base = 5.7-3.20090208.el6]
 \_  ncurses-libs-5.7-3.20090208.el6.x86_64 [2: libtinfo.so.5()(64bit), ncurses-libs]
 |   \_  glibc-2.12-1.132.el6_5.4.i686 [2: /sbin/ldconfig, rtld(GNU_HASH)]
 |   \_  glibc-2.12-1.132.el6_5.4.x86_64 [5: /sbin/ldconfig, libc.so.6(GLIBC_2.4)(64bit), libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit), rtld(GNU_HASH)]
 |   \_  ncurses-base-5.7-3.20090208.el6.x86_64 [1: ncurses-base = 5.7-3.20090208.el6]
11
  • What version of repoquery is this? I'm on F20 w/ version: 0.0.11 which does not include this switch.
    – slm
    Sep 2, 2014 at 13:49
  • 1.1.30-17.el6_5 Sep 2, 2014 at 13:50
  • So that switch might not be a standard switch, it's likely only with an older version or a forked version for RHEL.
    – slm
    Sep 2, 2014 at 13:53
  • Right you are. Even top have different switch set in different distros: unix.stackexchange.com/q/105908/16253 Sep 2, 2014 at 13:58
  • Yeah so I'd prefix your A so that it's clear this isn't standard switching, or find a general solution too and add it to this A.
    – slm
    Sep 2, 2014 at 14:00
0

For new OS versions, please use below (replace bash with your package name). repoquery from yum-utils but with available switches.

# repoquery --requires bash --tree

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .