LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-19-2008, 05:33 PM   #1
fsloke
LQ Newbie
 
Registered: Feb 2008
Posts: 9

Rep: Reputation: 0
How to check rpm dependencies?


How to check rpm dependencies?

the command will check the package requirements

Example

rpm ??? abc.rpm
=================
abc.rpm requires def.rpm

It also show the spec which version should install...

Last time my friend taught me but I forgot to jot it down after use...

Anyway, hope you all can help...
 
Old 02-19-2008, 05:38 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,340

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Quote:
Originally Posted by fsloke View Post
How to check rpm dependencies?

the command will check the package requirements

Example

rpm ??? abc.rpm
=================
abc.rpm requires def.rpm

It also show the spec which version should install...

Last time my friend taught me but I forgot to jot it down after use...

Anyway, hope you all can help...
rpm -R abc.rpm


----------------------
Steve Stites
 
Old 02-19-2008, 08:20 PM   #3
fsloke
LQ Newbie
 
Registered: Feb 2008
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jailbait View Post
rpm -R abc.rpm


----------------------
Steve Stites
I try type your command but the output is:

[root@localhost Desktop]# rpm -R mysql-5.0.22-2.1.i386.rpm
RPM version 4.4.2
Copyright (C) 1998-2002 - Red Hat, Inc.
This program may be freely redistributed under the terms of the GNU GPL

Usage: rpm [-aKfgpWHqV] [-aKfgpWHqVcdils] [-aKfgpWHqVcdilsaKfgpWHqV] [-aKfgpWHqVcdilsaKfgpWHqV] [-aKfgpWHqVcdilsaKfgpWHqV] [-aKfgpWHqVcdilsaKfgpWHqVK] [-aKfgpWHqVcdilsaKfgpWHqVK] [-aKfgpWHqVcdilsaKfgpWHqVKi] [-aKfgpWHqVcdilsaKfgpWHqVKiv] [-aKfgpWHqVcdilsaKfgpWHqVKiv] [-aKfgpWHqVcdilsaKfgpWHqVKiv?] [-a|--all] [-f|--file] [-g|--group]
[-p|--package] [-W|--ftswalk] [--pkgid] [--hdrid] [--fileid]
[--specfile] [--triggeredby] [--whatrequires] [--whatprovides]
[--nomanifest] [-c|--configfiles] [-d|--docfiles] [--dump] [-l|--list]
[--queryformat=QUERYFORMAT] [-s|--state] [--nomd5] [--nofiles]
[--nodeps] [--noscript] [--comfollow] [--logical] [--nochdir]
[--nostat] [--physical] [--seedot] [--xdev] [--whiteout]
[--addsign] [-K|--checksig] [--delsign] [--import] [--resign]
[--nodigest] [--nosignature] [--initdb] [--rebuilddb] [--aid]
[--allfiles] [--allmatches] [--badreloc] [-e|--erase <package>+]
[--excludedocs] [--excludepath=<path>] [--fileconflicts] [--force]
[-F|--freshen <packagefile>+] [-h|--hash] [--ignorearch] [--ignoreos]
[--ignoresize] [-i|--install] [--justdb] [--nodeps] [--nomd5]
[--nocontexts] [--noorder] [--nosuggest] [--noscripts]
[--notriggers] [--oldpackage] [--percent] [--prefix=<dir>]
[--relocate=<old>=<new>] [--repackage] [--replacefiles]
[--replacepkgs] [--test] [-U|--upgrade <packagefile>+]
[-D|--define 'MACRO EXPR'] [-E|--eval 'EXPR'] [--macros=<FILE:...>]
[--nodigest] [--nosignature] [--rcfile=<FILE:...>] [-r|--root ROOT]
[--querytags] [--showrc] [--quiet] [-v|--verbose] [--version]
[-?|--help] [--usage] [--scripts] [--setperms] [--setugids]
[--conflicts] [--obsoletes] [--provides] [--requires] [--info]
[--changelog] [--xml] [--triggers] [--last] [--filesbypkg]
[--fileclass] [--filecolor] [--filecontext] [--fscontext]
[--recontext] [--fileprovide] [--filerequire] [--redhatprovides]
[--redhatrequires] [--buildpolicy=<policy>] [--with=<option>]
[--without=<option>]
[root@localhost Desktop]#

Last edited by fsloke; 02-19-2008 at 08:21 PM.
 
Old 07-02-2008, 10:39 AM   #4
jmwhite5
LQ Newbie
 
Registered: Jul 2006
Location: San Jose, CA, USA
Distribution: Centos 4.8 & Fedora 11
Posts: 4

Rep: Reputation: 0
It's a query command. You have to use -q:

e.g.:

[root@jumpy jumpy]# rpm -qR libmpcdec
/sbin/ldconfig
/sbin/ldconfig
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1.3)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
 
Old 05-31-2011, 12:28 PM   #5
me-macias
Member
 
Registered: Feb 2006
Posts: 40

Rep: Reputation: 15
This only works for installed package. How do you do it for not installed package?
 
Old 05-31-2011, 02:02 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,512

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 5, @me-macias : Do not use old threads for your questions.
Start a new thread instead, please.


Suse : # zypper info --requires <package-name>

→ Use # zypper se <name> (or part of name) to decide a package name.
The example 'mysql' would be : # zypper info --requires mysql

.
 
1 members found this post helpful.
Old 05-31-2011, 02:02 PM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,512

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
# 5, @me-macias : Do not use old threads for your questions.
Start a new thread instead, please.


Suse : # zypper info --requires <package-name>

→ Use # zypper se <name> (or part of name) to decide a package name.
The example 'mysql' would be : # zypper info --requires mysql

.
 
1 members found this post helpful.
Old 06-01-2011, 08:48 AM   #8
me-macias
Member
 
Registered: Feb 2006
Posts: 40

Rep: Reputation: 15
Thank you.

About Q&A -- time does not matter, only if the topic is relevant. You don't want to see twin threads, just because somebody asked "and what about source packages". The topic (answer) should be exhaustive.

About zypper -- it does not work. I have local rpm, which has requirements inside (for sure, because you can peek with MC), but zypper if I am not mistaken take into account only repositories.
 
Old 06-01-2011, 12:22 PM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,512

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
It possible to check for non installed dependencies.

$ rpm -Uvh --test <package.rpm>

( man rpm http://linux.die.net/man/8/rpm )


To see all dependencies, I'm afraid you'll have to unpack (with mc),
to read the file 'INFO/REQUIRENAME'.
I may remember wrong, and if I find a better solution, I will report back.

..
 
1 members found this post helpful.
Old 06-02-2011, 08:20 AM   #10
me-macias
Member
 
Registered: Feb 2006
Posts: 40

Rep: Reputation: 15
Thank you! Nice trick. +1 upvote.

Anyway, if there is a way to use regular rpm to list those requirements it would be great.
 
Old 12-07-2011, 11:35 AM   #11
jmkelm08
Member
 
Registered: Nov 2005
Posts: 33

Rep: Reputation: 15
I had the same question. Found this solution on the linux-rpm-cheat-sheet
Code:
rpm -qpR {.rpm-file}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command to check library dependencies daihard Linux - Software 6 12-04-2014 10:26 PM
check dependencies syeronne Linux - Newbie 1 11-30-2005 09:53 AM
how to check rpm dependencies demmylls Linux - General 9 01-31-2005 12:14 PM
How do I check for dependencies? glenn69 Linux - Newbie 4 05-06-2004 05:28 PM
RPM 'failed dependencies': Why can I not install any rpm packages? leontini Linux - Newbie 7 09-16-2003 12:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration