-bash: locate: command not found

Error Message:

[root@server ~]# locate filename
-bash: locate: command not found

You may receive the above error message while searching a file using locate command and the error indicates that the package “slocate” required for the locate command is not installed. To install the package, execute:

yum -y install slocate

You will now be able to use the locate command but before that, execute the command “updatedb” so that the locate database is updated.

This entry was posted on Monday, October 19th, 2009 and is filed under Linux Administration. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.