當我們在安裝一個不熟悉的命令是,會遇到個問題:Error: Nothing to do
而你又不知道該命令的是屬于哪個rom包,莫慌~我們可以借助一個叫yum的基于rpm的軟件包管理器。
以 dig 這個命令為例,當我安裝它時會出現如下情況
[root@localhost ~]# yum install dig
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
* base: mirrors.163.com
* extras: mirrors.skyshe.cn
* updates: mirrors.163.com
No package dig available.
Error: Nothing to do
在yum里,可以用whatprovides來查找到dig這個命令是屬于哪個路徑,為什么呢?man yum就會發現,whatprovides是支持通配符選項的。
[root@localhost ~]# yum whatprovides *dig
…
…
…
…
32:bind-utils-9.8.2-0.37.rc1.el6_7.7.x86_64 : Utilities for querying DNS name servers
Repo : installed
Matched from:
Filename : /usr/bin/dig
在最后一行我們看到了dig的包名和所在的路徑。那么接下來就可以安裝了
[root@localhost ~]# yum install bind-utils -y
搞定。
原創文章,作者:黑白子,如若轉載,請注明出處:http://www.www58058.com/13302
如果加上背景的介紹,會讓文章更專業