Yum show the contents of a package

Linux

Let’s say you’ve identified a dependency that is needed on your machine, but you don’t know what package will provide the required file, you can use the “yum search <name> | grep <more granular name>” to narrow it down, but to see inside the package before install you can run the below, in my example I was looking for what provided the “gettext.pm” file, the package “perl-gettext” looked like it might, to be sure I ran:

# repoquery -l perl-gettext

/usr/lib64/perl5/vendor_perl/Locale

/usr/lib64/perl5/vendor_perl/Locale/gettext.pm

/usr/lib64/perl5/vendor_perl/auto/Locale

/usr/lib64/perl5/vendor_perl/auto/Locale/gettext

/usr/lib64/perl5/vendor_perl/auto/Locale/gettext/gettext.so

/usr/share/doc/perl-gettext-1.05

/usr/share/doc/perl-gettext-1.05/README

/usr/share/man/man3/Locale::gettext.3pm.gz

And as you can see its listed, so this is the right package to install.

Leave a Reply

Your email address will not be published. Required fields are marked *