LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-24-2009, 12:11 AM   #1
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Rep: Reputation: 55
finding rpms


Hi all...

I am trying to find the required rpms for some binaries..
Code:
[vinay@TEG ~]$ rpm -q --whatrequires /bin/ls
redhat-lsb-3.1-19.fc8.i386
jre-1.6.0_14-fcs.i586
Code:
[vinay@TEG ~]$ rpm -q --whatrequires /sbin/ifconfig
no package requires /sbin/ifconfig
why ifconfig does not require any package ???!!!
 
Old 11-24-2009, 12:18 AM   #2
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,629

Rep: Reputation: Disabled
--whatrequires is the way around you are thinking. It is not that ifconfig does not require any package but it is that no package requires ifconfig.
 
Old 11-24-2009, 12:29 AM   #3
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by linuxlover.chaitanya View Post
--whatrequires is the way around you are thinking. It is not that ifconfig does not require any package but it is that no package requires ifconfig.
Thanks linuxlover.chaitanya...

Then you mean
Code:
[vinay@TEG ~]$ rpm -qf /sbin/ifconfig
net-tools-1.60-87.fc9.i386
[vinay@TEG ~]$ rpm -qf /bin/ls
coreutils-6.10-18.fc9.i386
ifconfig requires net-tools-1.60-87.fc9.i386.rpm right....

then when --whatrequires is exactly required...?

Code:
[vinay@TEG ~]$ rpm -q --whatrequires /bin/ls
redhat-lsb-3.1-19.fc8.i386
jre-1.6.0_14-fcs.i586
Does this indicates redhat-lsb-3.1-19.fc8.i386 and jre-1.6.0_14-fcs.i586 requires coreutils-6.10-18.fc9.i386 installed....? I am confused please help me...
 
Old 11-24-2009, 12:31 AM   #4
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,629

Rep: Reputation: Disabled
From man page:

Quote:
--whatrequires CAPABILITY
Query all packages that requires CAPABILITY for proper function-
ing.
It will give the list of all the packages that are dependent on the package mentioned in the command for the proper functioning.
 
Old 11-24-2009, 12:39 AM   #5
AngTheo789
Member
 
Registered: Sep 2009
Posts: 110

Rep: Reputation: 24
@vinaytp: Based on your postings you will need to use both --whatprovides CAPABILITY and --whatrequires CAPABILITY - either to find out what package holds a certain tool and which other tools depend on that tool.
 
Old 11-24-2009, 12:47 AM   #6
divyashree
Senior Member
 
Registered: Apr 2007
Location: Bangalore, India
Distribution: RHEL,SuSE,CentOS,Fedora,Ubuntu
Posts: 1,386

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by vinaytp View Post
Hi all...

I am trying to find the required rpms for some binaries..
Code:
[vinay@TEG ~]$ rpm -q --whatrequires /bin/ls
redhat-lsb-3.1-19.fc8.i386
jre-1.6.0_14-fcs.i586
Code:
[vinay@TEG ~]$ rpm -q --whatrequires /sbin/ifconfig
no package requires /sbin/ifconfig
why ifconfig does not require any package ???!!!
Here
Code:
whatrequires
is required to check the dependencies of that package,

If u want to know the package name of the binary,

use
Code:
  rpm -qf <binary>
or
use (to search any rpm package is installed or not)
Code:
  rpm -qa | grep <package name>

Last edited by divyashree; 11-24-2009 at 12:48 AM.
 
Old 11-24-2009, 12:51 AM   #7
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by linuxlover.chaitanya View Post
package mentioned in the command for the proper functioning.
Dear All...

Thanks for your inputs...But I hope we cannot mention package name with --whatrequires option

This provides on which pkg ifconfig depends...
Code:
rpm -q --whatprovides /sbin/ifconfig
net-tools-1.60-87.fc9.i386
Also
This tells redhat-lsb-3.1-19.fc8.i386 and jre-1.6.0_14-fcs.i586 requires /bin/ls capability installed
Code:
[root@TEG vinay]# rpm -q --whatrequires /bin/ls
redhat-lsb-3.1-19.fc8.i386
jre-1.6.0_14-fcs.i586
Hope I am correct...Please guide me if I am wrong....

Last edited by vinaytp; 11-24-2009 at 12:53 AM.
 
Old 11-24-2009, 12:55 AM   #8
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,629

Rep: Reputation: Disabled
Package here I meant ls or ifconfig that you were referring to. I should have meant binary.

The first:

It says the capability of ifconfig is provided by net-tools. It means ifconfig needs net-tools package installed for proper functioning.

While in the second example:

The packages in the output of the command require ls for the proper functioning.
 
Old 11-24-2009, 01:01 AM   #9
vinaytp
Member
 
Registered: Apr 2009
Location: Bengaluru, India
Distribution: RHEL 5.4, 6.0, Ubuntu 10.04
Posts: 707

Original Poster
Rep: Reputation: 55
Quote:
Originally Posted by linuxlover.chaitanya View Post
Package here I meant ls or ifconfig that you were referring to. I should have meant binary.

The first:

It says the capability of ifconfig is provided by net-tools. It means ifconfig needs net-tools package installed for proper functioning.

While in the second example:

The packages in the output of the command require ls for the proper functioning.
Finally I understood the Concept...Once again thanks to all....
 
Old 11-24-2009, 05:41 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,492

Rep: Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639Reputation: 3639
Also useful :

# yum provides */ls

# yum provides */ifconfig
.....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
For loop to delete all RPMS except for RPMS on the list. keysorsoze Linux - Newbie 5 05-20-2008 03:42 PM
Finding files and then finding content within those files... Maeltor Linux - Software 5 03-13-2007 12:06 PM
how to intall rpms from .tar.bz and .tar.gz and .src.rpms gadekishore Linux - Software 13 12-26-2005 02:57 PM
Red Hat RPMs vs Mandrake RPMs pioniere Linux - Distributions 4 02-27-2003 12:38 PM
Finding .so's within RPMs X11 Linux - General 2 02-05-2002 03:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:24 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