LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   locate problems (https://www.linuxquestions.org/questions/linux-newbie-8/locate-problems-99648/)

Abe_the_Man 10-02-2003 09:53 PM

locate problems
 
when i type the command locate i get an error. Here's an example:

root@Silver_jet:~# locate zangband
warning: locate: could not open database: /var/lib/slocate/slocate.db: No such file or directory
root@Silver_jet:~#

what's the problem?? Zangband installed (i just finished installing it).

Azmeen 10-02-2003 10:08 PM

run updatedb first as root.

Cool... my 700th post :P

canon 10-02-2003 10:11 PM

of you can try
you@box# whereis Zangband

Abe_the_Man 10-03-2003 12:24 AM

Well Azmeen i tried updatedb but got this error:

root@Silver_jet:~# updatedb
warning: updatedb: could not open database: /var/lib/slocate/slocate.db: No such file or directory

And canon, i tried whereis and it worked! Thanks alot! But i'd be much more comfortable if i knew why locate wasn't working. Any ideas anyone?

Azmeen 10-03-2003 01:44 AM

Abe... that is normal... it will always show that the first time you run updatedb on a virgin system. Your consequential updatedb won't return such messages.

Your locate whatever will work from now on.

Abe_the_Man 10-03-2003 10:58 AM

Thanks loads Azmeen! Just made me feel a WHOLE lot better! (my system isn't broken, and i'm not huge idiot who ruined his sytem within hours!)

Azmeen 10-03-2003 07:35 PM

No prob Abe... Slack is hard to break anyway, unless you work in root unnecassarily :)

mindfrost82 02-23-2004 06:25 PM

I'm getting the same error. I tried updatedb and it gave me the same error, and I tried locate again and it didn't work, same error. Any suggestions?

mindfrost82 02-24-2004 07:31 PM

I figured it out. As root run "locate -u" to build the database start at the / directory and all subdirectories.


All times are GMT -5. The time now is 09:03 AM.