Welcome to the Linux Foundation Forum!

Usage of 'rpm -q --whatprovides'

akamchakamch Posts: 3
edited September 2020 in LFS201 Class Forum

What does libc.so.6 mean as a 'particular requisite package'? (WRT section 'Queries' in RPM module).

The --whatprovides option will show what installed package provides a particular requisite package:

$ rpm -q --whatprovides libc.so.6

I've got the following result:

$ rpm -q --whatprovides libc.so.6
no package provides libc.so.6

'man rpm' mentions '[--whatprovides CAPABILITY]' syntax where CAPABILITY is something like this:

$ rpm -q --whatprovides webserver
httpd-2.4.6-93.el7.centos.x86_64

This also works (but 'rpm -qf' may be simpler in this case):

$ rpm -q --whatprovides /lib64/libc.so.6
glibc-2.17-307.el7.1.x86_64

Answers

  • Hmmm, can you try with
    $ rpm -qf /lib64/libc.so.6 ???

  • Hi @akamch ,

    Yep, libc.so.6 is now provided by glibc. I tested this on CentOS 7:

    [[email protected] ~]$ locate libc.so
    /usr/lib/x86_64-redhat-linux6E/lib64/libc.so
    /usr/lib64/libc.so
    /usr/lib64/libc.so.6

    [[email protected] ~]$ rpm -qf /usr/lib64/libc.so.6
    glibc-2.17-307.el7.1.x86_64

    Regards,
    Luis.

  • Is this a PATH 'problem'? Or is the full path always necessary with the --whatprovides argument?

  • lee42xlee42x Posts: 295

    Yes, it is a $PATH thing, not a problem as such. I always use the full path name.

    Regards Lee

Sign In or Register to comment.