4

I know dnf provides could find a package which includes a specific command, for example,

$ dnf whatprovides g++
Last metadata expiration check: 0:57:32 ago on Wed May 20 09:43:51 2020.
gcc-c++-9.3.1-2.wf31.x86_64 : C++ support for GCC
Repo        : @System
Matched from:
Provide    : g++ = 9.3.1-2.wf31

gcc-c++-9.3.1-2.wf31.x86_64 : C++ support for GCC
Repo        : release
Matched from:
Provide    : g++ = 9.3.1-2.wf31

But when I need a header file, I want to find out its package name similar like dnf provides a-header-file-name, but it doesn't work. For example, $ dnf provides cm/api/transactionmanager.hpp Last metadata expiration check: 1:01:49 ago on Wed May 20 09:43:51 2020. Error: No Matches found

$ dnf provides transactionmanager.hpp
Last metadata expiration check: 1:01:55 ago on Wed May 20 09:43:51 2020.
Error: No Matches found
Giacomo1968
  • 58,727

1 Answers1

8

Putting a wild card at the front may help. For example:

This does not work:

dnf provides types.h

Error: No Matches found

But this does work:

dnf provides */types.h

shift
  • 106