-bash: locate: command not found

在输入 locate命令 查询时报了这个错。在百度上查了下资料,
image
发现问题是因为没有安装mlocate这个包

安装的命令:yum -y install mlocate
image

发现依然有问题:locate: can not stat () /var/lib/mlocate/mlocate.db': No such file or directory
image
原因:安装完后没有更新库
更新库:updatedb
image
问题就解决了。

posted @ 2021-11-15 20:19  小洋ssr  阅读(62)  评论(0编辑  收藏  举报