Our production server is running CentOS release 5.2 (Final).

How do I see/get/list all the dependencies of an already installed RPM package?

For example: SQLite v3.3.6 is already installed in the server. I want to see all the dependencies of this particular package.

Here is the output of the command: rpm -qa |grep sqlite

python-sqlite-1.1.7-1.2.1
sqlite-3.3.6-2
sqlite-3.3.6-2

Also, why it is listing 2 entries of sqlite-3.3.6-2 here?

link|improve this question

68% accept rate
feedback

3 Answers

up vote 2 down vote accepted
  1. rpm -q --requires somepackagehere

  2. One is the i?86 package, the other is the x86_64 package.

link|improve this answer
My OS is 64-bit. Can 2 architecture packages co-exist in the same server? What is the purpose/need of having 2 architecture packages at the same time? – Gnanam Nov 9 '10 at 9:17
1  
RH-/Fedora-derived distros support multiarch, whereby multiple packages belonging to "different-yet-similar-enough" archs can coexist in order to allow running executables built for either arch. – Ignacio Vazquez-Abrams Nov 9 '10 at 9:23
Thanks for your comments. – Gnanam Nov 9 '10 at 9:46
feedback

The yum deplist command will show you which rpm is required:

# yum deplist expect
..
..
package: expect.i386 5.43.0-5.1
 dependency: libc.so.6
  provider: glibc.i686 2.5-49
  provider: glibc.i686 2.5-49
 dependency: libtcl8.4.so
  provider: tcl.i386 8.4.13-4.el5
link|improve this answer
This command is not working. Am I missing something or there is something missing in your command? – Gnanam Nov 9 '10 at 9:14
Sorry there was a space missing, the command is yum deplist package. – davey Nov 9 '10 at 9:39
+1 It was helpful. – Gnanam Nov 9 '10 at 9:44
feedback

Following on Ignacio's answer, you can see the specific architecture of the packages by doing the following:

$ rpm -qa --queryformat "%{NAME} %{ARCH}\n" sqlite
sqlite i686

In my case, I only have the one, i686 package...but you can get the architecture associated with the packages that way. If you are interested in what else you can get from the --queryformat, issue a rpm --querytags to see the list of variables available.

link|improve this answer
+1 Your command on listing by architecture-wise is also helpful. – Gnanam Nov 9 '10 at 8:58
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.