How do I find which rpm package supplies a file I'm looking for?

how to find which package a file belongs to in redhat
files in a rpm package
rpm list files in package
how to check which packages provides the specific file or feature
rpm list installed packages
how to find what rpm a file came from
rpm files belonging to package
rpm find files in rpm

As an example, I am looking for a mod_files.sh file which presumably would come with the php-devel package. I guessed that yum would install the mod_files.sh file with the php-devel x86_64 5.1.6-23.2.el5_3 package, but the file appears to not to be installed on my filesystem.

How do I find out which package installs a specific file? I'm looking for where I have not necessarily already locally downloaded the package which may include the file that I'm looking for.

I'm using CentOS 5.

This is an old question, but the current answers are incorrect :)

Use yum whatprovides, with the absolute path to the file you want (which may be wildcarded). For example:

yum whatprovides '*bin/grep'

Returns

grep-2.5.1-55.el5.x86_64 : The GNU versions of grep pattern matching utilities.
Repo        : base
Matched from:
Filename    : /bin/grep

You may prefer the output and speed of the repoquery tool, available in the yum-utils package.

sudo yum install yum-utils
repoquery --whatprovides '*bin/grep'
grep-0:2.5.1-55.el5.x86_64
grep-0:2.5.1-55.el5.x86_64

repoquery can do other queries such as listing package contents, dependencies, reverse-dependencies, etc.

How to find which rpm package provides a specific file or library in , You go to http://www.rpmfind.net and search for the file. The package name SHOULD be without number and system type so yum packager can choose what is best for him. There 2 commands which can help you find the rpm package from the file – rpm and yum. You can also find all the files included in a package with the rpm command. Find rpm package which provides a particular binary file or library file 1. Method 1 : using rpm command. 1. Use below rpm commands to find which rpm package provide a particular file.

To know the package owning (or providing) an already installed file:

rpm -qf myfilename

How do I find which rpm package supplies a file I'm , Question. As an example, I am looking for a mod_files.sh file which presumably would come with the php-devel package. I guessed that yum� To show what files are in a package, use the rpm command. rpm -ql package. If you have the file name, you can turn this around and find the related package. rpm -qf /bin/ps. The output will provide the package and its version. To just see the package name, use the –queryformat option. rpm -qf /bin/ps --queryformat '%{NAME}' With yum you can

The most popular answer is incomplete:

Since this search will generally be performed only for files from installed packages, yum whatprovides is made blisteringly fast by disabling all external repos (the implicit "installed" repo can't be disabled).

yum --disablerepo=* whatprovides <file>

How do I find which rpm package supplies a file I'm , If the file is already available in your system, say for example /bin/ls, you can then find the package that owns the file using command: # rpm -qf� rpm: Find out what files are in my rpm package. Use following syntax to list the files for already INSTALLED package: rpm -ql package-name. Use following syntax to list the files for RPM package: rpm -qlp package.rpm . Type the following command to list the files for gnupg*.rpm package file: $ rpm -qlp rpm -qlp gnupg-1.4.5-1.i386.rpm Sample

You go to http://www.rpmfind.net and search for the file.

You'll get results for a lot of different distros and versions, but quite likely Fedora and/or CentOS will pop up too and you'll know the package name to install with yum

How To Find The Package That Provides A Specific File In Linux , rpm list files in package yum whatprovides command yum list files in package rpm list installed packages find rpm package rpm what files in package rpm find� The rpm2cpio tool enables retrieval of the cpio file without needing to install the RPM package. More recent versions of RPM can also use bzip2, lzip, lzma, or xz compression. RPM 5.0 format supports using xar for archiving. Open/Extract RPM File on Windows. Easy 7-Zip opens/extracts RPM file easily on Windows. The Easy 7-Zip was developed

Well finding the package when you are connected to internet (repository) is easy however when you only have access to RPM packages inside Redhat or Centos DVD (this happens frequently to me when I have to recover a server and I need an application) I recommend using the commands below which is completely independent of internet and repositories. (supposably you have lots of uninstalled packages in a DVD). Let's say you have mounted Package folder in ~/cent_os_dvd and you are looking for a package that provides "semanage" then you can run:

for file in `find ~/cent_os_dvd/ -iname '*.rpm'`;  do rpm -qlp $file |grep '.*bin/semanage';  if [ $? -eq 0 ]; then echo "is in";echo $file  ; fi;  done

How do I find which rpm package supplies a file I , I use the rpm -qf /bin/ls command under Red Hat Enterprise Linux to find out package name. Can you tell me the equivalent command for the� tl;dr This post covers how to list files, show package information and extract the contents of an RPM package. There will be example commands presented for extracting RPM package files and showing information for packages that are both installed, and not-installed on a system. Extract files from an RPM (quick start) $ rpm2cpio ./packagecloud-test-1.1-1.x86_64.rpm | cpio -idmv Continue reading

Debian / Ubuntu Linux: Find Out What Package Provides a File , What Files Are In a RPM Package?, How do I list the contents of a package using rpm or yum command on CentOS/RHEL/Fedora/Red Hat/OpenSuse/Novell� rpm is a low-level tool that is used to install, uninstall, upgrade, query, and verify RPM packages. To install an RPM package use the rpm -i command followed by the RPM package name: sudo rpm -ivh file.rpm. The -v option tells rpm to show verbose output and -h to show the hash marked progress bar.

How do I find which rpm package supplies a file I , How do I find which rpm package supplies a file I'm looking for? [mysql@mysql01 lib]$ ldd /my/mysql/lib/libgalera_smm.so linux-vdso.so.1� Relocating an RPM package. 1. Relocating an rpm package allows user to install the rpm package to a different directory than the default. That means you may install the rsync package into a different directory, say /opt using the rpm option –prefix like this:

How do I find which rpm package supplies a file I'm looking for?, yum info irssi Installed Packages Name : irssi Arch : i586 Version : 0.8.14 Release Therefore, if the package is in two or more primary.xml files, you will have to determine the repo priority on you system. On RedHat and CentOS one can do To convert RPM to MP3, MP4, or some other non-archive format like that, your best bet is to first extract the files from the archive. You can do that with a decompression program like we mentioned above. Then, once you've taken the MP3 (or whatever file) out of the RPM file, use a free file converter on those files.

Comments
  • superuser.com___?
  • @Grzegorz Good point, I've put in a vote to move.
  • here's a better answer: unix.stackexchange.com/a/4706/39281
  • @SamWatkins that answer will only work if the package that supplies the file you're looking for is already installed on the system. If the package is not installed (as the OP says) then you can't use rpm, you need to use yum.
  • this command looks to be more efficient than yum whatprovides--no need to get updates from possibly slow repositories.
  • This version also works on non redhat based distro's that still use rpm's such as openSUSE
  • It seems to me that rpm -qf <filename> is best suited for determining which package provides an installed application (since it may be different than what is in the current yum repository cache), and yum whatprovides <filename> is best suited for determining which package provides a yet-to-be-installed application. Each has their own purpose.
  • Furthermore, yum whatprovides ... only requires root if the application is a root package (i.e. it resides in /sbin). However, rpm -qf ... also requires root in order to read rpms from /sbin. Therefore, I propose that the root requirements are functionally equivalent for both methods.
  • Anyone using this command, please note that you have to use full file path + filename, and not just the file name.
  • In this case, however, the OP is specifically looking for a missing file that was not installed on the system, even after installing a package he thought would have it, so he can't use --disablerepo=*
  • This website is offline!
  • The website does not appear to search for files; only package names with the search term.
  • @jww Searching for files works fine for me at least. As the docs says, you can search for executables by their single path name or any file with the absolute path name.