40

When you are installing a program using .deb packages on Ubuntu, you can check dependencies of package using Ubuntu Packages Search. For example I can see dependencies of Wireshark from here. As you can see, dependencies marked by red bullet. If you know all packages your program depends them, you can download and install them using dpkg.

Is there any alternative website for RPM packages? Specially for RHEL?

I know that I can get these packages' names by other methods such as when installing RPM package using rpm -i, but it is not user friendly and needs access to running Linux.

MikeSchinkel
  • 4,947
  • 4
  • 38
  • 46
SuB
  • 2,250
  • 3
  • 22
  • 37

3 Answers3

67

In fact that's not a one but four different questions :).

*) First you can quickly list a downloaded package's dependencies/requirements by using the following commands:

$ rpm -qp mypackage.rpm --provides
$ rpm -qp mypackage.rpm --requires

*) Second, you can use yum utility in order to satisfy these (somewhat cryptic) dependencies automatically (assuming that all your repositories are set up correctly, and all the dependencies are available):

$ sudo yum install mypackage.rpm

*) Third, there are several RPM search resources, some of them already suggested above. I'd like to list another one, just for the reference - pkgs.org.

*) Fourth, there is an additional popular repository for RHEL5 and RHEL6 distros - EPEL. Note that it's not supported by Red Hat.

Hope my answer(s) will help.

Peter Lemenkov
  • 1,214
  • 11
  • 5
  • Why use the options `provides` and ` recommends? – Motivated Jan 22 '19 at 16:15
  • I prefer the short versions `rpm -qPp mypackage.rpm` and `rpm -qRp mypackage.rpm`. Also obviously works for already installed packages (`rpm -qP mypackage` and `rpm -qR mypackage`.) – pevik Jul 22 '20 at 09:58
20

To merely list all dependencies of a package on the command-line, here is an example which builds upon the answer by Peter:

$ PKG="http://yum.postgresql.org/9.3/redhat/rhel-6.2-x86_64/pgdg-sl93-9.3-1.noarch.rpm"

Using yum (recommended):

$ yum -q deplist $PKG
package: pgdg-sl93.noarch 9.3-1
  dependency: sl-release
   Unsatisfied dependency
  dependency: /bin/sh
   provider: bash.x86_64 4.1.2-8.el6
  dependency: config(pgdg-sl93) = 9.3-1
   provider: pgdg-sl93.noarch 9.3-1

-q above is of course optional and is equivalent to --quiet.

Using rpm:

$ rpm -qpR $PKG
/bin/sh  
config(pgdg-sl93) = 9.3-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
sl-release  

-qpR above is equivalent to --query --package --requires.

Community
  • 1
  • 1
Asclepius
  • 57,944
  • 17
  • 167
  • 143
1

This site http://www.rpmfind.net/linux/RPM/ provides a search engine for rpm files. You can see dependencies and description. It also classifies them per distro.

jabaldonedo
  • 25,822
  • 8
  • 77
  • 77