locate: command not found
September 5, 2012 1 Comment
Error message:
-bash: locate: command not found
Cause:
Locate is not installed.
Solution:
Find your OS installation disk and in Server folder find package like : mlocate-* , for me it is mlocate-0.15-1.el5.2.x86_64.rpm , and install it.
[root@node1 Server]# rpm -Uvh mlocate-0.15-1.el5.2.x86_64.rpm
warning: mlocate-0.15-1.el5.2.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing… ########################################### [100%]
1:mlocate ########################################### [100%]
If you try to run locate again you will receive the following error:
locate: can not open `/var/lib/mlocate/mlocate.db’: No such file or directory
To solve, run:
updatedb
Congratulations, you are able to run locate without any error!
Reblogged this on Gigable – Tech Blog.