Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
add comment

3 Answers

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

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

share|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
add comment

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
share|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  
+1 It was helpful. –  Gnanam Nov 9 '10 at 9:44
1  
+1 the use of YUM here is nice it's recursive and resolves things like 'perl(COnfig::Tiny)' or 'libc.so(64bit)'. –  djhaskin987 Jan 10 at 23:14
add comment

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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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