LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-15-2006, 01:02 AM   #1
hottdogg
Member
 
Registered: Aug 2004
Distribution: opensuse ,debian/ubuntu
Posts: 222

Rep: Reputation: 30
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?
 
Old 05-15-2006, 01:39 AM   #2
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

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

Last edited by gbonvehi; 05-15-2006 at 01:42 AM.
 
Old 05-15-2006, 01:40 AM   #3
peteaxon
LQ Newbie
 
Registered: Apr 2006
Location: Australia
Distribution: Slackware
Posts: 20

Rep: Reputation: 0
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)
 
Old 05-15-2006, 03:00 AM   #4
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
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.
 
Old 05-15-2006, 04:46 AM   #5
pdw_hu
Member
 
Registered: Nov 2005
Location: Budapest, Hungary
Distribution: Slackware, Gentoo
Posts: 346

Rep: Reputation: Disabled
Use, updatedb -c /etc/updatedb.conf, instead of plain updatedb.
 
Old 06-04-2006, 10:37 PM   #6
mpm
LQ Newbie
 
Registered: Jul 2005
Location: california, usa
Distribution: kubuntu
Posts: 6

Rep: Reputation: 0
Thumbs up 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
 
Old 06-04-2006, 10:53 PM   #7
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
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
 
Old 06-04-2006, 11:54 PM   #8
theoffset
Member
 
Registered: Aug 2005
Location: Guadalajara, Jal, Mexico
Distribution: Slackware Linux
Posts: 211

Rep: Reputation: 31
In my experience running
Code:
slocate -u
always works, even if there's no slocate.db database.
 
Old 06-04-2006, 11:59 PM   #9
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
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....
 
Old 06-05-2006, 01:57 AM   #10
hottdogg
Member
 
Registered: Aug 2004
Distribution: opensuse ,debian/ubuntu
Posts: 222

Original Poster
Rep: Reputation: 30
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?
 
Old 06-05-2006, 06:12 PM   #11
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
The '-c' creates the database.

Type
Code:
man 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
Why Do I need to run updatedb each time I search for a file or folder? lennysokol Linux - Software 4 05-30-2005 11:49 PM
how to configure updatedb.conf file for NFS sub-directory ursidious Linux - Newbie 1 04-05-2005 06:00 PM
updatedb and slocate runs at 5am, how can I change this? Archeantus Linux - Software 4 02-12-2005 06:06 PM
Quick slocate/updatedb question? King of Japan Linux - Newbie 4 08-29-2004 02:35 PM
missing updatedb file dowmun Linux From Scratch 4 08-25-2003 02:48 PM

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

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

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