LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   command locate not available (https://www.linuxquestions.org/questions/fedora-35/command-locate-not-available-465321/)

charlest 07-18-2006 06:09 PM

command locate not available
 
When my friend issued the "locate" command, it returned the following output. How should I fix it?

//////////////////////////////////////////
# locate ls
warning: locate: could not open database: /var/lib/slocate/slocate.db: No such file or directory
warning: You need to run the 'updatedb' command (as root) to create the database.
//////////////////////////////////////////

reddazz 07-18-2006 06:23 PM

The answer is right in front of you. Your friend should run "updatedb" so that /var/lib/slocate/slocate.db is created. Once thats done, your friend can then use locate. :)

jschiwal 07-18-2006 06:23 PM

First "su" to root, and then run the "updatedb" command. Just as the message says.

homey 07-18-2006 06:26 PM

On my FC5 boxen, that is now part of the mlocate package. I seem to recall it being slocate on previous installs.

Try installing it with yum...
yum install mlocate

then, update the database so it can find things with the command:
updatedb


All times are GMT -5. The time now is 05:41 AM.