dnf whatprovides and library files

Gordon Messmer gordon.messmer at gmail.com
Wed Jun 10 06:55:00 UTC 2015


On 06/09/2015 04:53 PM, Ed Greshko wrote:
> I can't seem to get dnf to tell me what package supplies a library.
...
> [root at f22k ~]# ll /lib64/libXv.so.1.0.0
> -rwxr-xr-x. 1 root root 19664 Aug 17  2014 /lib64/libXv.so.1.0.0
> [root at f22k ~]# dnf whatprovides /lib64/libXv.so.1.0.0

That's the correct query for a file, but not a library.

Two things:

First, applications don't link against libXv.so.1.0.0, they link against 
libXv.so.1.  It is up to the dynamic linker to locate that library 
within the search path:

$ ldd /usr/bin/xvinfo | grep libXv
	libXv.so.1 => /lib64/libXv.so.1 (0x00000032d3600000)

You'll see the same string in the first column when a library is not 
found, so that's the string that you look for.

Second, rpm generates "provides" with pathless library names.  In the 
example above, "xvinfo" is linked against "libXv.so.1".  rpm behaves the 
same way.  Since the application is linked against "libXv.so.1" that is 
the correct string to use when searching for a package that provides it.

$ dnf whatprovides libXv.so.1
libXv-1.0.10-2.fc22.i686 : X.Org X11 libXv runtime library
Repo        : @System



More information about the users mailing list