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

Run updatedb first.  You can run it manually from the command line.

updatedb

It should have scheduled itself as a cron job when you installed slocate.  If you just installed slocate, it will not have run yet.  Otherwise, make sure you have a cron daemon running and that there is an updatedb task scheduled.  Also, make sure your computer is on when it it is scheduled

If this is a VM and does not run continuously especially never spent days on this will happen. Just in case check the cron job found here:

The cron job is found here:

/etc/cron.daily/mlocate.cron

Thats’ pretty much it.