LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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, 07: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, 07:23 PM   #2
reddazz
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
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

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

Rep: Reputation: 56
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-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 08:16 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration