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

Notices


Reply
  Search this Thread
Old 07-18-2006, 06:09 PM   #1
charlest
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, 06:23 PM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
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, 06:23 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

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

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


Reply


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-08-2005 11:22 PM
How to use locate command MartinOG Linux - Newbie 3 06-07-2004 01:59 PM
using locate command stabu Linux - Newbie 6 03-26-2004 04:13 AM
What command will locate a particular.. cbjhawks Linux - General 1 03-21-2004 08:07 AM
Locate command does not work waffe Linux - General 2 09-26-2003 09:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:06 PM.

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