我将安装RPM软件包,并且可以看到某些依赖项也需要安装X服务器库。我绝对确定我需要的软件包是服务器软件,不需要X服务器。
我想知道是否有一种方法可以像在Gentoo Linux中一样打印出RPM依赖项列表?
此命令仅输出第一级依赖项,因此不适合我:
$ yum deplist <package name>
我将安装RPM软件包,并且可以看到某些依赖项也需要安装X服务器库。我绝对确定我需要的软件包是服务器软件,不需要X服务器。
我想知道是否有一种方法可以像在Gentoo Linux中一样打印出RPM依赖项列表?
此命令仅输出第一级依赖项,因此不适合我:
$ yum deplist <package name>
Answers:
在RHEL6中,有repoquery
来自yum-utils
软件包的命令。它可以做到这一点:
# 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]
top
在不同发行版中都设置了不同的开关:unix.stackexchange.com/q/105908/16253
repoquery
是什么版本?我使用的F20版本为:0.0.11,其中不包含此开关。