6 April 2016

Find easily a package with dnf or yum providing a library, header ...

Although it's not always well known, dnf (and yum) supports a very interesting and powerful command: provides.
For instance, it's very useful to fix issue like


libxxx.h not found, or libxyz.so.1.2 not found ...

For example, let's say you get the following error while compiling some driver:
libudev.h not found

You can fix it very quickly like this (the star and slash are very important because you don't know yet the path of the file in the package which provides it)
dnf provides */libudev.h

In this example, you'll get something like that
systemd-devel-222-14.fc23.i686 : Development headers for systemd
Repo        : updates
systemd-devel-222-14.fc23.x86_64 : Development headers for systemd
Repo        : updates
systemd-devel-222-7.fc23.i686 : Development headers for systemd
Repo        : fedora
systemd-devel-222-7.fc23.x86_64 : Development headers for systemd
Repo        : fedora
Eventually, you only have to install it
sudo dnf install systemd-devel

No comments:

Post a Comment

Thank you for your visit, let's share your point of view: