当前位置: 首页 > 工具软件 > is What > 使用案例 >

CentOS7.0下whatis不能使用的问题

孙俊彦
2023-12-01
今天下午在VMWare Station 14.0上面安装了 CentOS Linux 7 (Core) ; Kernel 3.10.0-693.e17.x86_64,然后开始参考鸟哥的 Linux 私房菜开始进行学习。在进行到使用 man -f 和 whatis 命令进行查询时,发现不能使用,命令行提示 nothing appropriate 。之后使用 man whatis , man man , info whatis 进行查询,发现 whatis 命令是可以使用的, man 命令也有 -f 的参数。百度查阅相关问题,得知是因为安装新操作系统后,还未到 man database 更新的时间,在 root 权限下使用 makewhatis 命令即可。但是在按照这个方法操作后,又有了新的提示: make: *** No rule to make target 'makewhais' ,再次上百度查询后,使用whereis whatis 查找了whatis命令所在的路径,并将其添加入 PATH 中,但还是相同的提示。最终在一个博客上找到了解决方案,即 CentOS 7 系统要使用 mandb命令来更新 man db , 而 CentOS 6.9 及之前的系统使用 makewhatis 命令。这一次在深入命令后,发现 whatis 命令可以正常执行。
 类似资料: