You are not logged in.

#1 2009-09-17 03:39:08

quepp42
Member
Registered: 2009-09-15
Posts: 3

'locate' command not working [SOLVED]

Whenever I try to use the 'locate' command it gives this error:

locate: can not stat () `/var/lib/mlocate/mlocate.db': No such file or directory

I checked pacman and i downloaded mlocate but it doesn't seem to make any difference. What am I doing wrong?

Last edited by quepp42 (2009-09-17 05:13:07)

Offline

#2 2009-09-17 03:45:12

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,477
Website

Re: 'locate' command not working [SOLVED]

Try updating (possibly creating in your case) the database.  "updatedb" as root.

Offline

#3 2009-09-17 03:49:01

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,230

Re: 'locate' command not working [SOLVED]

run updatedb first.  You can run it manually from the command line.

It should have scheduled itself as a cron job when you installed slocate.  If you just installed slocate, it will not have run yet.  Otherwise, make sure you have a cron daemon running and that there is an updatedb task scheduled.  Also, make sure your computer is on when it it is scheduled


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2009-09-17 05:11:32

quepp42
Member
Registered: 2009-09-15
Posts: 3

Re: 'locate' command not working [SOLVED]

thanks homies, it worked ^_^

Offline

#5 2011-08-20 03:16:51

loveqq1943
Member
From: China
Registered: 2011-02-15
Posts: 6

Re: 'locate' command not working [SOLVED]

thx, this post solved my problem too

Offline

#6 2011-08-20 04:47:21

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: 'locate' command not working [SOLVED]

loveqq1943, do not necro-bump threads with empty posts.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

Board footer

Powered by FluxBB