有时候知道程序的名称,却不知道由那个包提供,也就是说不知道安装那个包,可以使用这个命令。

我们由provides关键字可以使用。

举例:semanage是SELinux的一个管理工具,可是我使用:yum install semanage

却提示我没有这个包。

祭出provides神器,反向查找:

yun provides semanage

输出:

[root@noi ~]# yum provides semanage
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
base/7/x86_64/filelists_db                               | 6.6 MB     00:01
epel/x86_64/filelists_db                                 | 8.0 MB     00:01
extras/7/x86_64/filelists_db                             | 925 kB     00:00
updates/7/x86_64/filelists_db                            | 3.3 MB     00:01
policycoreutils-python-2.5-8.el7.x86_64 : SELinux policy core python utilities
Repo        : base
Matched from:
Filename    : /usr/sbin/semanage

policycoreutils-python-2.5-9.el7.x86_64 : SELinux policy core python utilities
Repo        : updates
Matched from:
Filename    : /usr/sbin/semanage

policycoreutils-python-2.5-11.el7_3.x86_64 : SELinux policy core python
                                           : utilities
Repo        : updates
Matched from:
Filename    : /usr/sbin/semanage

现在知道了:由policycoreutils-python这个包包提供。

yun install pollicycoreutils-python

搞定。

附加:官方对provides的解释,它还有一个别名whatprovides:

provides or whatprovides
              Is  used to find out which package provides some feature or file. Just use a specific name or a file-glob-syntax wildcards to
              list the packages available or installed that provide that feature or file.

最新文章

  1. IE8.0.6001这个版本执行JS报错
  2. ubuntu14.04 安装 hadoop2.4.0
  3. HTTP method POST is not supported by this URL
  4. sqlite - java 初学
  5. 【nodejs笔记4】搭建多人博客<内含http请求的get post方法区别>
  6. python之路二
  7. 一个比较有意思的C语言问题
  8. E-R图的基础练习
  9. N-Queens | & N-Queens II
  10. 黄聪:VS2010开发T4模版引擎之基础入门
  11. e2e 自动化集成测试 架构 实例 WebStorm Node.js Mocha WebDriverIO Selenium Step by step (一) 京东 商品搜索
  12. node.js 针对不同的请求路径(url) 做出不同的响应
  13. 关于javascript输出中文乱码的问题
  14. 清华集训2014 day1 task2 主旋律
  15. HDU 1599 find the mincost route (无向图floyd最小环详解)
  16. 微信开源PHP商城系统一处blind xxe(无需登录,附POC)
  17. 类中被final修饰的成员变量需要初始化
  18. ivew ui
  19. centos7 搭建ntp时钟服务器
  20. Mac OS Sierra安装源不能设置任何来源(anywhere)

热门文章

  1. SQL SERVER 2008 数据库置疑处理办法
  2. delphi 杀死进程
  3. boost.asio包装类st_asio_wrapper开发教程(转)
  4. [Android Memory] Android系统中查看某个应用当前流量的方法
  5. salt-minion和salt-master之间如何重新认证
  6. 解决安装mysqlclient出现问题:mysql_config: not found
  7. Oracle判断两个时间段是否相交
  8. IP地址转换、主机大小端、htonl、ntohl实现
  9. PLSQL Developer连接远程Oracle方法(非安装client)
  10. log4j实现每一个线程保存一个日志文件