locate: can not stat () `/var/lib/mlocate/mlocate.db’

Got the below error while trying to use the locate command.

locate: can not stat () `/var/lib/mlocate/mlocate.db’: No such file or directory

The fix was pretty simple. Just ran the updatedb command. Locate started working just fine.

root@test1:~# updatedb
root@test1:~# locate jdk



Leave a Reply

Your email address will not be published. Required fields are marked *