LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   No slocate.db file. Can't updatedb (http://www.linuxquestions.org/questions/slackware-14/no-slocate-db-file-cant-updatedb-444868/)

hottdogg 05-15-2006 01:02 AM

No slocate.db file. Can't updatedb
 
I use slackware 10.2

Few days ago I wanted to run updatedb. Here's what I got...
Code:

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

What's the solution?

gbonvehi 05-15-2006 01:39 AM

You can recreate it with: touch /var/lib/slocate/slocate.db

peteaxon 05-15-2006 01:40 AM

As root enter the following,

touch /var/lib/slocate/slocate.db

This creates the new file "slocate.db", (Note: touch can be used to update a file's last accessed date or in this case to create a new empty file).

Now you can run "updatedb" (also as root)

cs-cam 05-15-2006 03:00 AM

Sure you need to do that? I got that warning after a fresh install not long ago but notice, it's a warning, not an error. It created the file and went on to build the database by itself.

pdw_hu 05-15-2006 04:46 AM

Use, updatedb -c /etc/updatedb.conf, instead of plain updatedb.

mpm 06-04-2006 10:37 PM

thanks
 
On my system, locatedb failed after upgrading to my distro's latest revision (Kubuntu Dapper).
Thanks for the tips! For me these 2 things (from different sections of this thread) fixed the issue.

sudo touch /var/lib/slocate/slocate.db
sudo updatedb -c /etc/updatedb.conf

cwwilson721 06-04-2006 10:53 PM

Quote:

Originally Posted by mpm
On my system, locatedb failed after upgrading to my distro's latest revision (Kubuntu Dapper).

Another distro fixed by Slackers.

Never doubt the power of Slackware.....lol

theoffset 06-04-2006 11:54 PM

In my experience running
Code:

slocate -u
always works, even if there's no slocate.db database.

cwwilson721 06-04-2006 11:59 PM

Quote:

Originally Posted by theoffset
In my experience running
Code:

slocate -u
always works, even if there's no slocate.db database.

lol
That also creates the db....

hottdogg 06-05-2006 01:57 AM

Tnx, I did these:
Code:

touch /var/lib/slocate/slocate.db
updatedb -c /etc/updatedb.conf

what is -c option for in updatedb?
the difference with plain updatedb?

cwwilson721 06-05-2006 06:12 PM

The '-c' creates the database.

Type
Code:

man updatedb


All times are GMT -5. The time now is 08:00 PM.