Linux fatal error: updatedb: create_db(): chdir: No such file or directory
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.

Leave a Reply