Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Fedora This forum is for the discussion of the Fedora Project.


  Search this Thread
Old 07-18-2006, 07:09 PM   #1
LQ Newbie
Registered: Jul 2006
Location: Sydney, Australia
Distribution: Red Hat 7.2, 8 and 9
Posts: 10

Rep: Reputation: 0
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.
Old 07-18-2006, 07:23 PM   #2
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 74
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.
Old 07-18-2006, 07:23 PM   #3
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 658Reputation: 658Reputation: 658Reputation: 658Reputation: 658Reputation: 658
First "su" to root, and then run the "updatedb" command. Just as the message says.
Old 07-18-2006, 07:26 PM   #4
Senior Member
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 58
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:


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Locate command matt1982 Linux - General 3 01-09-2005 12:22 AM
How to use locate command MartinOG Linux - Newbie 3 06-07-2004 02:59 PM
using locate command stabu Linux - Newbie 6 03-26-2004 05:13 AM
What command will locate a particular.. cbjhawks Linux - General 1 03-21-2004 09:07 AM
Locate command does not work waffe Linux - General 2 09-26-2003 10:54 PM

All times are GMT -5. The time now is 05:09 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration