Blog Untuk Semua

Everything for Everyone

locate: fatal error: Could not find user database ‘/var/lib/slocate/slocate.db’: No such file or directory

Tinggalkan komentar

root@slackware:~# locate php.ini-recommended
locate: fatal error: Could not find user database '/var/lib/slocate/slocate.db': No such file or directory

Don’t worry, that does not means your Linux locate command is not working. The error stated that ‘/var/lib/slocate/slocate.db’ could not be found. That means Linux doesn’t have locate database yet. What you can do is to run updatedb command. Login into command line terminal and su – to gain root privilege. See an example below for the complete steps:

luzar@slackware:~$ su -
root@slackware:~# updatedb

If you are using Ubuntu, use sudo updatedb command and provide your password.

The database update process will take some times. When it finished, you can try using Linux locate command again to search for file. To find a file in Linux system using locate command or to locate a file, we just invoke locate filename from the command line terminal.

Below is an example on how to search file using Linux locate command:

root@slackware:~# locate php.ini-recommended

Sometimes you’ll get warning when running locate command such as the example below:

root@slackware:~# locate php.ini-recommended
locate: warning: database /var/lib/slocate/slocate.db' is more than 8 days old

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:


You are commenting using your account. Logout /  Ubah )

Foto Google+

You are commenting using your Google+ account. Logout /  Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout /  Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout /  Ubah )


Connecting to %s