Linux fatal error: updatedb: create_db(): chdir: No such file or directory

December 2, 2008 on 4:45 pm | In linux |

Got this error when running updatedb from a Red Had Linux command prompt:
fatal error: updatedb: create_db(): chdir: No such file or directory

The problem:
[root@iberia george]# fatal error: updatedb: create_db(): chdir: No such file or directory

As you can see, I’m running as root, so this shouldn’t be a permissions problem. Probably a file lock or corrupt database problem.

The cause: Many people get this error when the slocate database becomes corrupt.

The Fix: First, if you’re running two instances of updatedb at once, quit doing that. :) Second, try removing and re-creating the database, as someone advises in a Gentoo linux forum:

Remove contents of /var/lib/slocate/ using
[root@iberia george]# rm /var/lib/slocate/*

Then re-run updatedb
[root@iberia george]# updatedb -u

This should fix the problem.

Like this story? Share with others on:
      del.icio.us    digg    reddit    furl
      

No Comments yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> <pre lang="" line="">

Powered by WordPress with Pool theme design by Borja Fernandez.
Entries and comments feeds. Valid XHTML and CSS. ^Top^
43 queries. 0.240 seconds.