我知道dnf provides
可以找到包含特定命令的包,例如
$ 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
但是当我需要一个头文件时,我想找到它的包名类似dnf provides a-header-file-name
,但它不起作用。例如,$ dnf 提供 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
答案1
在前面放一张通配符可能会有帮助。例如:
这确实不是工作:
dnf provides types.h
Error: No Matches found
但这确实有效:
dnf provides */types.h