My first command: slocate slocate slocate: fatal error: Could not find user database '/opt/local/var/db/slocate/slocate.db': No such file or directory My second command: which slocate /opt/local/bin/slocate My third command: sudo /opt/local/etc/daily.slocate Rebuilding slocate database: slocate: fatal error: load_file: Could not open file: /opt/local/etc/updatedb.conf: No such file or directory Can anyone help me get slocate going? Where is updatedb.conf supposed to come from, and why wasn't it installed when I installed slocate? TIA, David.Epstein@warwick.ac.uk -- View this message in context: http://www.nabble.com/Trying-to-update-the-slocate-database-tf4606431.html#a... Sent from the MacPorts - Users mailing list archive at Nabble.com.
David Epstein wrote:
My first command: slocate slocate slocate: fatal error: Could not find user database '/opt/local/var/db/slocate/slocate.db': No such file or directory
My second command: which slocate /opt/local/bin/slocate
My third command: sudo /opt/local/etc/daily.slocate Rebuilding slocate database: slocate: fatal error: load_file: Could not open file: /opt/local/etc/updatedb.conf: No such file or directory
Can anyone help me get slocate going? Where is updatedb.conf supposed to come from, and why wasn't it installed when I installed slocate? TIA, David.Epstein@warwick.ac.uk
I should have said sudo periodic daily instead of trying to cut into the middle of the action. This ran correctly. Apologies. David.Epstein@warwick.ac.uk -- View this message in context: http://www.nabble.com/Trying-to-update-the-slocate-database-tf4606431.html#a... Sent from the MacPorts - Users mailing list archive at Nabble.com.
On Oct 11, 2007, at 05:40, David Epstein wrote:
My first command: slocate slocate slocate: fatal error: Could not find user database '/opt/local/var/db/slocate/slocate.db': No such file or directory
My second command: which slocate /opt/local/bin/slocate
My third command: sudo /opt/local/etc/daily.slocate Rebuilding slocate database: slocate: fatal error: load_file: Could not open file: /opt/local/etc/updatedb.conf: No such file or directory
I get that message too... but the script does not exit, and it does build the slocate.db. Takes several minutes. Then slocate works fine. Guess the error wasn't fatal after all. You or the maintainer (whom I'm Cc'ing) could report that misleading message to the developers of slocate. There's more weirdness going on. daily.slocate includes this: if [ -f /opt/local/etc/updatedb.conf ]; then # One day, I'll look at the bug that requires doing cd / when launched # with periodic. (cd / && /opt/local/bin/slocate -u -c) else (cd / && /opt/local/bin/slocate -u) fi So, if the conf file exists, it uses the -c option. Otherwise it doesn't. Since, for you, the conf file doesn't exist, it should have used the version without the -c option. Why, then, is slocate still trying to read the conf file? I tried to avoid the message by creating an empty conf file: sudo touch /opt/local/etc/updatedb.conf But now I get: slocate: option requires an argument -- c But the manpage does not show that -c requires or even supports an argument: -c Parse '/opt/local/etc/updatedb.conf' when updating the slocate database. (see CONFIGURATION FILE below). Sounds like there are plenty of bugs here that should be reported upstream.
Can anyone help me get slocate going? Where is updatedb.conf supposed to come from, and why wasn't it installed when I installed slocate?
The maintainer could comment on why a conf file was not installed with the port by default, but I'd guess it's optional.
On 2007-10-11 06:16:13 -0500, Ryan Schmidt wrote:
But now I get:
slocate: option requires an argument -- c
However, though one gets this message, slocate rebuilds the database.
But the manpage does not show that -c requires or even supports an argument:
-c Parse '/opt/local/etc/updatedb.conf' when updating the slocate database. (see CONFIGURATION FILE below).
Sounds like there are plenty of bugs here that should be reported upstream.
FYI, I did this via the Debian BTS a few months ago, since the Debian package has the same problem and its maintainer is Kevin Lindsay, the author of slocate: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=427487 The last time I found a bug in slocate, I wrote a patch. This may be the best thing to do to get this bug fixed. -- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)
participants (3)
-
David Epstein
-
Ryan Schmidt
-
Vincent Lefevre