can't make locate db on mac

380 views Asked by At

I failed to use locate command in Mac Terminal. Here is my situation:

  1. I have already run

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

  1. Logs when run as user:

./locate.mklocatedb ^Clocate.mklocatedb: cannot build locate database rmdir: /var/folders/sh/nzqq8z612bz1k1nt7k0jr6680000gn/T//mklocatet0qA6zDDUe: No such file or directory

  1. Logs when run as root:

sudo -s ./locate.mklocatedb
Password: ^Clocate.mklocatedb: cannot build locate database rmdir: /tmp/mklocateIMIB7Z4JDM: No such file or directory

  1. the /etc/locate.rc is unchanged.

  2. env $LOCATE_CONFIG is not set yet.

PS: the reason I press Ctrl + c to terminal the locate.mklocatedb is: there isn't a circle running at the right-top of current Terminal Tab anymore.

Thanks for your help!

0

There are 0 answers