LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   finding rpms (https://www.linuxquestions.org/questions/linux-newbie-8/finding-rpms-771139/)

vinaytp 11-24-2009 12:11 AM

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 ???!!!

linuxlover.chaitanya 11-24-2009 12:18 AM

--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.

vinaytp 11-24-2009 12:29 AM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3767578)
--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...

linuxlover.chaitanya 11-24-2009 12:31 AM

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.

AngTheo789 11-24-2009 12:39 AM

@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.

divyashree 11-24-2009 12:47 AM

Quote:

Originally Posted by vinaytp (Post 3767569)
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>

vinaytp 11-24-2009 12:51 AM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3767586)
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....

linuxlover.chaitanya 11-24-2009 12:55 AM

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.

vinaytp 11-24-2009 01:01 AM

Quote:

Originally Posted by linuxlover.chaitanya (Post 3767607)
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....

knudfl 11-24-2009 05:41 AM

Also useful :

# yum provides */ls

# yum provides */ifconfig
.....


All times are GMT -5. The time now is 05:25 PM.