admin管理员组文章数量:1659568
问题描述:
当尝试使用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
版权声明:本文标题:使用whatis命令时提示nothing appropriate 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dongtai/1726296283a1064648.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论