apt-cache show <package>
shows also it's dependencies.
yum info <package>
does not show dependencies, but it obviously know them.
How to ask yum for dependencies of specified package?
yum doesn't have that capability. Use the repoquery
tool from the yum-utils
package instead.
repoquery --requires <package>
OR to also see which additional RPM packages are needed to satisfy the dependencies, use --resolve
repoquery --requires --resolve <package>
rpm -qp --requires <package file>
.
Nov 26, 2012 at 12:27
--resolve
actually do? Running repoquery --requires --resolve
on a package that is already installed should return an empty list right, since all dependencies are already satisfied? When I tried it on a package that is already installed, I got a few listed, including itself (all of these are already installed).
Use deplist
command,
yum deplist <package>
From yum's manual:
Produces a list of all dependencies and what packages provide those dependencies for the given packages.
To do the same thing with dnf, we can do
dnf repoquery --requires <package>
As man yum2dnf
said:
Alternative to Yum deplist command to find out dependencies of the package is dnf repoquery --requires using repoquery plugin.
If you have a local RPM, you can get a list of dependencies via:
rpm -qpR mediawiki-1.4rc1-4.i586.rpm
If you need the list of packages needed, use:
dnf repoquery --requires --resolve`
In the case of firefox, by running:
sudo dnf repoquery --requires --resolve firefox
I've got the ouput:
Last metadata expiration check: 0:00:00 ago on Wed 13 Dec 2017 21:41:47 GMT.
atk-0:2.26.1-1.fc27.x86_64
bash-0:4.4.12-12.fc27.x86_64
cairo-0:1.15.8-1.fc27.x86_64
cairo-gobject-0:1.15.8-1.fc27.x86_64
dbus-glib-0:0.108-4.fc27.x86_64
dbus-libs-1:1.12.0-1.fc27.x86_64
fontconfig-0:2.12.6-4.fc27.x86_64
freetype-0:2.8-6.fc27.x86_64
freetype-freeworld-0:2.8-4.fc27.x86_64
gdk-pixbuf2-0:2.36.11-1.fc27.x86_64
glib2-0:2.54.2-1.fc27.x86_64
glibc-0:2.26-16.fc27.i686
glibc-0:2.26-16.fc27.x86_64
gtk2-0:2.24.31-6.fc27.x86_64
gtk3-0:3.22.26-1.fc27.x86_64
hunspell-0:1.5.4-4.fc27.x86_64
libX11-0:1.6.5-4.fc27.x86_64
libX11-xcb-0:1.6.5-4.fc27.x86_64
libXcomposite-0:0.4.4-11.fc27.x86_64
libXdamage-0:1.1.4-11.fc27.x86_64
libXext-0:1.3.3-7.fc27.x86_64
libXfixes-0:5.0.3-4.fc27.x86_64
libXrender-0:0.9.10-4.fc27.x86_64
libXt-0:1.1.5-6.fc27.x86_64
libffi-0:3.1-14.fc27.x86_64
libgcc-0:7.2.1-2.fc27.x86_64
libjpeg-turbo-0:1.5.1-4.fc27.x86_64
libstdc++-0:7.2.1-2.fc27.x86_64
libvpx-0:1.6.1-4.fc27.x86_64
libxcb-0:1.12-5.fc27.x86_64
mozilla-filesystem-0:1.9-17.fc27.x86_64
nspr-0:4.17.0-1.fc27.i686
nspr-0:4.17.0-1.fc27.x86_64
nss-0:3.34.0-1.0.fc27.i686
nss-0:3.34.0-1.0.fc27.x86_64
nss-util-0:3.34.0-1.0.fc27.x86_64
p11-kit-trust-0:0.23.8-1.fc27.i686
p11-kit-trust-0:0.23.9-2.fc27.x86_64
pango-0:1.40.14-1.fc27.x86_64
startup-notification-0:0.12-14.fc27.x86_64
u2f-hidraw-policy-0:1.0.2-5.fc27.x86_64
zlib-0:1.2.11-4.fc27.x86_64
If you want to install a package and it's dependencies via yum, try the localinstall option instead if install. The localinstall
install a package and finds any dependencies and downloads them:
$ yum -y localinstall <package>
I am no yum guru but this works fine for me, makes it easy to install including dependencies :-)