使用whatis命令时提示nothing appropriate

问题描述:

当尝试使用whatis ls时,提示:ls:nothing appropriate 。

[root@haojin ~]# whatis man
man: nothing appropriate.
[root@haojin ~]# whatis ls
ls: nothing appropriate.
[root@haojin ~]# whatis wc
wc: nothing appropriate.

如下图

在这里插入图片描述

原因分析:

问度娘才知道,原来whatis是根据数据库执行查找操作的,这个数据库是定期更新的,新安装的系统,系统还未自动更新,所以可以使用makewhatis手动更新,再次运行whatis ls,可以成功使用了。要有root权限才能使用makewhatis.

解决方案:

[root@haojin ~]# makewhatis
bash: makewhatis: command not found...
Install package 'mandoc' to provide command 'makewhatis'? [N/y] y


 * Waiting in queue... 
 * Loading list of packages.... 
The following packages have to be installed:
 mandoc-1.14.5-12.el8.x86_64	A suite of tools for compiling mdoc and man
Proceed with changes? [N/y] y


 * Waiting in queue... 
 * Waiting for authentication... 
 * Waiting in queue... 
 * Loading list of packages.... 
 * Requesting data... 
 * Testing changes... Failed to install packages: Error running transaction: file /usr/share/man/man7/mdoc.7.gz from install of mandoc-1.14.5-12.el8.x86_64 conflicts with file from package man-pages-4.15-6.el8.x86_64
[root@haojin ~]# whereis makewhatis
makewhatis:
[root@haojin ~]# whereis whatis
whatis: /usr/bin/whatis /usr/share/man/man1/whatis.1.gz


[root@haojin ~]# whatis ls
ls (1)               - list directory contents
ls (1p)              - list directory contents
[root@haojin ~]# whatis file
file (1)             - determine file type
file (1p)            - determine file type
[root@haojin ~]# whatis wc
wc (1)               - print newline, word, and byte counts for each file
wc (1p)              - word, line, and byte or character count

在这里插入图片描述

在这里插入图片描述

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值