Bug 12670 - running updatedb command (in debian is part of mlocate package) from the console results in an error
Summary: running updatedb command (in debian is part of mlocate package) from the cons...
Status: CLOSED FIXED
Alias: None
Product: IPFire
Classification: Unclassified
Component: --- (show other bugs)
Version: 2
Hardware: x86_64 Linux
: - Unknown - Minor Usability
Assignee: Michael Tremer
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-05 14:05 UTC by cfusco
Modified: 2022-02-09 19:26 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cfusco 2021-08-05 14:05:58 UTC
When I ssh to my machine and issue the "udatedb" command, I get the following error:

/usr/bin/updatedb: line 320: /var/lib/locate/locatedb.n: No such file or directory
Failed to generate /var/lib/locate/locatedb.n

My system is the following:

IPFire hardware: https://fireinfo.ipfire.org/profile/cd68d09a672adb3a335204ae2e9cbd06abc6be86
IPFire version: IPFire 2.25 (x86_64) - core158
Pakfire version: 2.25-x86_64
Kernel version: Linux ipfire.localdomain 4.14.232-ipfire #1 SMP Thu Jul 15 17:56:34 GMT 2021 x86_64 AMD GX-412TC SOC AuthenticAMD GNU/Linux 

Fresh install using the ISO, followed by a restore my configuration.
Comment 1 Paul Simmons 2021-08-05 16:01:21 UTC
Might this be a permissions or ownership problem for the directory "/var/lib/locate/" ?

My system shows:
drwxr-xr-x 2 root root 4096 Aug  5 10:29 /var/lib/locate/
Comment 2 cfusco 2021-08-05 16:12:19 UTC
I do not have it at all:

[root@ipfire ~]# ls -la /var/lib/locate/
ls: cannot access '/var/lib/locate/': No such file or directory

I installed core158 from the iso, reformatting the hard disk.
Comment 3 cfusco 2021-08-05 16:33:46 UTC
This is what I have in the /var/lib/ directory

[root@ipfire ~]# du -ah /var/lib/
4.0K	/var/lib/usb_modeswitch
4.0K	/var/lib/logrotate.status
48M	/var/lib/location/database.db
4.0K	/var/lib/location/signing-key.pem
48M	/var/lib/location
4.0K	/var/lib/suricata/threshold.config
4.0K	/var/lib/suricata/classification.config
0	/var/lib/suricata/whitelist.rules
4.0K	/var/lib/suricata/reference.config
16K	/var/lib/suricata
4.0K	/var/lib/unbound/root.key
8.0K	/var/lib/unbound
4.0K	/var/lib/sasl
4.0K	/var/lib/alternatives/sendmail
8.0K	/var/lib/alternatives
4.0K	/var/lib/squidguard
48M	/var/lib/
Comment 4 Paul Simmons 2021-08-05 21:04:19 UTC
FYI: "Component" should be "IPFire" and "Version" should be "2" for this bugzilla entry...

It's curious that the directory doesn't exist on your system. Is this a recent "fresh" install?

Have you tried using mkdir, followed by chown and chmod?
Comment 5 Paul Simmons 2021-08-05 21:06:45 UTC
Whups... reviewed the thread... I see it's a fresh install :).
Comment 6 Larsen 2021-12-07 10:51:13 UTC
Had the same problem after restoring from ISO. Easy fix was to "mkdir /var/lib/locate".
Comment 8 Peter Müller 2021-12-23 20:12:49 UTC
https://git.ipfire.org/?p=people/pmueller/ipfire-2.x.git;a=commit;h=2b676f2e428e336d8673d53b0aae018e7849966f

Not bumping to MODIFIED since this is my temporary branch for Core Update 163. However, I expect this commit to land into next soon...