-bash: locate: command not found解决方案

locate: command not found错误 , 暗示locate找不到 , 也就是没有安装mlocate这个包 , 具体细节在本篇经验具体介绍

-bash: locate: command not found解决方案

文章插图

需要这些哦
linux
linux客户端
方式/
1输入locate 1.log号令 , 成果返回-bash: locate: command not found

-bash: locate: command not found解决方案

文章插图

2需要安装mlocate包 , 利用yum  -y install mlocate号令安装mlocate包

-bash: locate: command not found解决方案

文章插图

3安装完当作

-bash: locate: command not found解决方案

文章插图

4再次测验考试 , 输入locate 1.log , 仍是报错 , 错误内容为
locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory

-bash: locate: command not found解决方案

文章插图

5原因是安装完后没有更新库 , 需要利用updatedb号令来更新库

-bash: locate: command not found解决方案

文章插图

6【-bash: locate: command not found解决方案】再次利用locate号令就可以查找了

-bash: locate: command not found解决方案

文章插图

注重事项利用locate功能可以快速查找文件
不积跬步无以至千里

以上内容就是-bash: locate: command not found解决方案的内容啦 , 希望对你有所帮助哦!

    推荐阅读