LoginSignup
4
1

More than 3 years have passed since last update.

CentOSでパッケージの依存関係をTree表示したい

Posted at

CentOSでパッケージの依存関係をTree表示したい

AというパッケージがBというパッケージに依存していて、そのBというパッケージはCとDのパッケージに依存していて・・・という関係をTree構造で一気に見るコマンドがあります。

repoqueryです。yum-utilsというパッケージに入っています。

CentOS7とCentOS8のそれぞれで、postfixパッケージの依存関係を見てみましょう。

CentOS7の場合
# yum install -y yum-utils

# repoquery --tree-requires postfix
postfix-2:2.10.1-9.el7.x86_64 [cmd line]
 \_  bash-0:4.2.46-34.el7.x86_64 [2: /bin/bash, /bin/sh]
 |   \_  glibc-0:2.17-307.el7.1.i686 [1: rtld(GNU_HASH)]
 |   \_  glibc-0:2.17-307.el7.1.x86_64 [4: libc.so.6(GLIBC_2.15)(64bit), libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit), rtld(GNU_HASH)]
 |   \_  ncurses-libs-0:5.9-14.20130511.el7_4.x86_64 [1: libtinfo.so.5()(64bit)]
 |   |   \_  glibc-0:2.17-307.el7.1.i686 [2: /sbin/ldconfig, rtld(GNU_HASH)]
・・・・
以下大量に
CentOS8の場合
# dnf install -y yum-utils

# repoquery --tree --requires postfix
postfix-2:3.3.1-12.el8.x86_64
 \_ bash-0:4.4.19-10.el8.x86_64 [6: rtld(GNU_HASH), libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit), libc.so.6(GLIBC_2.15)(64bit), libtinfo.so.6()(64bit), filesystem >= 3]
 |   \_ filesystem-0:3.8-2.el8.x86_64 [2: /bin/sh, setup]
 |   |   \_ bash-0:4.4.19-10.el8.x86_64 [6: rtld(GNU_HASH), libdl.so.2()(64bit), libdl.so.2(GLIBC_2.2.5)(64bit), libc.so.6(GLIBC_2.15)(64bit), libtinfo.so.6()(64bit), filesystem >= 3]
 |   |   \_ setup-0:2.12.2-5.el8.noarch [1: system-release]
・・・・
以下大量に

CentOS7とCentOS8で少しだけオプションが違うようです。

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1