Re: Fwd: How can i find out, what files a RPM is provding?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rick Stevens wrote:
Jeff Vian wrote:

On Mon, 2005-01-31 at 10:12 -0600, David Hoffman wrote:

On Mon, 31 Jan 2005 09:03:30 -0700 (GMT-07:00), James Mckenzie
<jjmckenzie51@xxxxxxxxxxxxx> wrote:

Don't you have to install an additional .rpm to get this functionality? I had to, just in case the .rpm was not installed on my system. Details are in the archive on installation of the appropriate files.



I've never heard that. The query function is a standard function of
RPM. If you have RPM installed (and you should) then you should be
able to perform any queries of your RPM packages.

Try rpm -? for additional help.

rpm -q  = query mode
--whatprovides is an argument to the query mode that tells RPM to look
at it's own data and tell you which packages provided a particular
file.

For example, I want to know what package I installed that provided me
with libmysqlclient.so.10:

rpm -q --whatprovides libmysqlclient.so.10

Then it gives me back an answer:
MySQL-shared-compat-4.1.9-0

So any file that is installed from an RPM package can be queried this
way to let you know which package installed the file.

I didn't have to add any additional packages to be able to do this
query -- or at least none that I intentionally added.



No extra packages are needed for the query, but the query will also only
work, as has been stated, only with files that were installed from RPM.
If the file was put in the system from CPAN or some other source the rpm
query should fail to produce output about it.

Also, the full path to the file must be provided in the query since that
is the way the package identifies the file.


I think the OP was asking which files a given RPM has in it.

If the RPM has been installed, then use "rpm -qf rpmname".  If the RPM
HASN'T been installed yet, then "rpm -qf -p /path/to/rpmfile.rpm"

You might also find it interesting to use "-qif" rather than just "-qf".

DOH! "rpm -ql" not "-qf" (what the heck was I thinking?)
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens@xxxxxxxxxxxxxxx -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-                 IGNORE that man behind the keyboard!               -
-                                                - The Wizard of OS  -
----------------------------------------------------------------------



--
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens@xxxxxxxxxxxxxxx -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-      Always remember you're unique, just like everyone else.       -
----------------------------------------------------------------------


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux