zoukankan      html  css  js  c++  java
  • yum中查找程序由哪个包提供

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

    我们由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.

  • 相关阅读:
    mysql 账户管理
    关于数据库设计的思考(三)
    学习 ThinkPHP 框架笔记
    学习 Ext Js 所感
    mysql 一个较特殊的问题:You can't specify target table 'wms_cabinet_form' for update in FROM clause
    关于数据库设计的思考(二)
    flash、flex 项目开发学习时的笔记
    web.config 中SessionState的配置
    公农历转换
    使用Microsoft Web Application Stress Tool对web进行压力测试
  • 原文地址:https://www.cnblogs.com/litifeng/p/6940738.html
Copyright © 2011-2022 走看看