使用whatis命令时提示nothing appropriate

阅读: 评论:0

使用whatis命令时提示nothing appropriate

使用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 
Install package 'mandoc' to provide command 'makewhatis'? [N/y] y* Waiting  * Loading list  
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  * Waiting  * Waiting  * Loading list  *  *  Failed to install packages: Error running transaction: file /usr/share/man/man7/ 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/[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

本文发布于:2024-03-05 17:42:46,感谢您对本站的认可!

本文链接:https://www.4u4v.net/it/1709702635124120.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:命令   提示   whatis
留言与评论(共有 0 条评论)
   
验证码:

Copyright ©2019-2022 Comsenz Inc.Powered by ©

网站地图1 网站地图2 网站地图3 网站地图4 网站地图5 网站地图6 网站地图7 网站地图8 网站地图9 网站地图10 网站地图11 网站地图12 网站地图13 网站地图14 网站地图15 网站地图16 网站地图17 网站地图18 网站地图19 网站地图20 网站地图21 网站地图22/a> 网站地图23